function askConfirmation() {
	return confirm('Emin misiniz?');
}

function askDeleteConfirmation() {
	return confirm('Silmek istediğinize emin misiniz?');
}

function checkRemainingCharLimit(textbox, charLimit) {
    return (charLimit > textbox.value.length);
}

function updateRemainingCharCount(textbox, charLimit, labelId) {
    var label = document.getElementById(labelId);
    label.innerHTML = charLimit - textbox.value.length;
    label.style.color = (charLimit < textbox.value.length) ? '#FF0000' : null;
}

function openProductPictureWindow(url) {
     var width  = 624;
     var height = 624;
     var left   = (screen.width  - width) / 2;
     var top    = (screen.height - height) / 2;
     var params = 'width=' + width;
     params += ', height=' + height;
     params += ', top=' + top; 
     params += ', left=' + left;
     params += ', directories=no';
     params += ', location=no';
     params += ', menubar=no';
     params += ', resizable=no';
     params += ', scrollbars=no';
     params += ', status=no';
     params += ', toolbar=no';
    
    productPictureWindow = window.open(url,'productPictureWindow', params);
    
    if (window.focus) {
        productPictureWindow.focus();
    }
    
    return false;
}

function openTermsOfServiceWindow(url) {
     var width  = 624;
     var height = 624;
     var left   = (screen.width  - width) / 2;
     var top    = (screen.height - height) / 2;
     var params = 'width=' + width;
     params += ', height=' + height;
     params += ', top=' + top; 
     params += ', left=' + left;
     params += ', directories=no';
     params += ', location=no';
     params += ', menubar=no';
     params += ', resizable=no';
     params += ', scrollbars=no';
     params += ', status=no';
     params += ', toolbar=no';
    
    productPictureWindow = window.open(url,'termsOfServiceWindow', params);
    
    if (window.focus) {
        productPictureWindow.focus();
    }
    
    return false;
}

function openSalePrintWindow(url) {
    var width  = 630;
    var height = 630;
    var left   = (screen.width  - width) / 2;
    var top    = (screen.height - height) / 2;
    var params = 'width=' + width;
    params += ', height=' + height;
    params += ', top=' + top; 
    params += ', left=' + left;
    params += ', directories=no';
    params += ', location=no';
    params += ', menubar=no';
    //params += ', resizable=no';
    params += ', scrollbars=yes';
    params += ', status=no';
    params += ', toolbar=no';
   
   productPictureWindow = window.open(url,'salePrintWindow', params);
   
   if (window.focus) {
       productPictureWindow.focus();
   }
   
   return false;
}



