<!--

 function OrderFormValidate(AForm){

    checkrules=true;
		
    if (AForm.order_delivery_method.value == "-") {
            alert("Wybierz sposób dostawy.\n");
            return false;
        }
    if (AForm.rules.checked != true) {
            alert("Przed złożeniem zamówienia prosimy o akceptację naszego regulaminu.\n");
           // OpenNewWindow('/popup,regulamin_sklepu.html', 500, 650);  
            return false;
        }
 
     return true;   
}


 function validateFormSimpleSearch(){
 
 searchword=document.getElementById('searchword');
 
 if(searchword.value.length<3 || searchword.value=='szukana fraza') {
 alert('Poszukiwana fraza powinna mieć co najmniej 3 znaki.\n              Uzupełnij pole.');
 return false;
 
 }
 return true;
 
 }   
    
 function OpenNewWindow(url, sz, wys) { 
	var srodekX = screen.availWidth/2;
	srodekX -= sz/2;
	var srodekY = screen.availHeight/2;
	srodekY -= wys/2;
	if (document.all){
		var nowe = window.open(url,'NewWindow',"'scrollbars=0, HEIGHT="+wys+",WIDTH="+sz+",top="+srodekY+",left="+srodekX+"'")		
	} else {
		var nowe = window.open(url, 'NewWindowl', "',HEIGHT="+wys+", WIDTH="+sz+", screenY="+srodekY+", screenX="+srodekX+"'");
	}
	nowe.focus();
	return false;
}


function sprawdzenie(form) {
checkrules=true;
typ=document.getElementById('platnosc');

if(typ.options[form.typ.selectedIndex].getAttribute('value')=='-') {
 komunikat='- Podaj imię\n';
 checkrules=false;

}
}

function AddToFavorites(PageUrl,PageTitle)
{
    if (window.sidebar) {
        window.sidebar.addPanel(PageTitle, PageUrl, "");
    } else if (window.external){
         window.external.AddFavorite(PageUrl, PageTitle)
    }
}

function printOrder(orderid){

window.open('/pages/order_print.php?orderid='+orderid,'printOrder',"height=600,width=800,status=no,toolbar=no,menubar=no,location=no");
}

function LinkConfirm(questionText,linkText) {

    isOKBan=false;
     isOKBan = window.confirm(questionText);
     if (isOKBan) {
    top.location.href=linkText;
    return true;
    }

}

/* sortowanie produktów w kategoriach */
function sort(s1,s2,link) {
	document.location=link+'&s1='+s1+'&s2='+s2;
}
//--> 

