<!--

function displayWindow(ur1,name,width,height){
var Win = window.open(ur1,'name','width='+width+',height='+height+',resizable=0,scrollbars=NO,menubar=no,left=400,top=200');
Win.focus(); 
}


function displayWindow2(ur1,name,width,height){
var Win = window.open(ur1,'name','width='+width+',height='+height+',resizable=1,scrollbars=yes,menubar=no,left=300,top=200');
Win.focus(); 
}

function zmienwym(w,h)
{
	
	resizeTo(w,h);

} 

function Mieszaj()
{
	if (moveBy) 
	for (i=10; i>0; i--)
	{
		moveBy(i,0);
		moveBy(-i,0);
	}
	else alert("Twoja przeglądarka nie obsługuje tej opcji.");
} 

function FileWindow(file,szer,wys) {


   neww = window.open(file,'','toolbar=no, menubar=no, location=no, personalbar=no, scrollbars=yes, directories=no, status=no, resizable=YES, width='+(szer)+', height='+(wys+25));
   neww.focus();

}
function Okno(obrazek,szer,wys) {
var L='<HTML>\n<HEAD>\n\t<TITLE>Galeria</TITLE>\n\t<META http-equiv="Content-Type" content="text/html;charset=iso-8859-2">\n\t</HEAD>\n<BODY style="background-color : #FBE0AE;">\n\n\t<center>\n\t\t<a href="javascript:window.close()">\n\t\t<img src="';
var R='"  title="Fenster schliessen" img border="1">\n\t</a>\n\t<center>\n\n</BODY>\n</HTML>';
NoweOkno=window.open('','','toolbar=no, menubar=no, location=no, personalbar=no, scrollbars=auto, directories=no, status=no, resizable=yes, width='+(szer+25)+', height='+(wys+25));
NoweOkno.document.open();
NoweOkno.document.write(L+obrazek+R);
NoweOkno.document.close();
NoweOkno.focus();
}


function Okno(obrazek,szer,wys) {

   var L='<HTML>\n<HEAD>\n\t<TITLE>Galeria</TITLE>\n\t<META http-equiv="Content-Type" content="text/html;charset=iso-8859-2">\n\t</HEAD>\n<BODY style="background-color : #FBE0AE;">\n\n\t<center>\n\t\t<a href="javascript:window.close()">\n\t\t<img src="';
   var R='"  title="Fenster schliessen" width='+szer+', height='+wys+' img border="0">\n\t</a>\n\t<center>\n\n</BODY>\n</HTML>';
   NoweOkno=window.open('','','toolbar=no, menubar=no, location=no, personalbar=no, scrollbars=auto, directories=no, status=no, resizable=yes, width='+(szer+25)+', height='+(wys+25));
   NoweOkno.document.open();
   NoweOkno.document.write(L+obrazek+R);
   NoweOkno.document.close();
   NoweOkno.focus();

}


var Netscape4 = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4") || (navigator.appName == "Mozilla" );
var Explorer4 = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");


function rollDesc(desc,divID,wybierz) {

        var myText = "ColorSet" + divID;

         if (Explorer4) {
                myText=eval(myText);
                myText.innerHTML = wybierz + ":&nbsp;"+ desc;
        } else if (Netscape4)
        {

                  document.getElementById(myText).innerHTML = wybierz + ":&nbsp;"+  desc;
        }

}

function Okno(obrazek,szer,wys) {
var L='<HTML>\n<HEAD>\n\t<TITLE>Galeria</TITLE>\n\t<META http-equiv="Content-Type" content="text/html;charset=iso-8859-2">\n\t</HEAD>\n<BODY style="background-color : #FBE0AE;">\n\n\t<center>\n\t\t<a href="javascript:window.close()">\n\t\t<img src="';
var R='"  title="Fenster schliessen" width='+szer+', height='+wys+' img border="0">\n\t</a>\n\t<center>\n\n</BODY>\n</HTML>';
NoweOkno=window.open('','','toolbar=no, menubar=no, location=no, personalbar=no, scrollbars=auto, directories=no, status=no, resizable=yes, width='+(szer+25)+', height='+(wys+25));
NoweOkno.document.open();
NoweOkno.document.write(L+obrazek+R);
NoweOkno.document.close();
NoweOkno.focus();

}


function swap(imageURL, desc)
{
    document.getElementById("ColorSet1").innerHTML = desc;
    document.getElementById("ShowImage").src = imageURL;
}


function swapImage(imageURL,imageID,desc)
{

    document.images["colorImage_" + imageID].src = imageURL;

    var myText = "ColorSet1" ;

    if (Explorer4) {
           myText=eval(myText);
           myText.innerHTML = ""+ desc +"";
    } else if (Netscape4)
    {

          document.getElementById(myText).innerHTML ="<H1>"+ desc +"</H1>";
    }

}

function FileWindow(file,szer,wys) {


   neww = window.open(file,'','toolbar=no, menubar=no, location=no, personalbar=no, scrollbars=yes, directories=no, status=no, resizable=no, width='+(szer+25)+', height='+(wys+25));
   neww.focus();

}


function SumujCeny()
{
   
   var el       = document.forms['produkty'].elements;
   var Suma     = document.forms['produkty'].razem;
   var SumaWag  = document.forms['produkty'].SumaWag;
   
   Suma.value = 0;
   
   for(var i = 0 ; i < el.length ; ++i) {
      
	  if(el[i].type == 'checkbox') {

         wstecz2 = i - 2;
		 wstecz3 = i - 3;
		 wstecz4 = i - 4;
		 
		 var ProduktCena   = el[wstecz4].value;
         var ProduktIle    = el[wstecz3].value;
		 var ProduktWaga   = el[wstecz2].value;
         var BylSumowany   = el[i].checked;
		 
		 //alert(ProduktIle);
		 
		 if(BylSumowany && ProduktIle != '') {
		    
			Suma.value = (Suma.value * 1) + (ProduktCena * ProduktIle);
			SumaWag.value = (SumaWag.value * 1) + ProduktWaga * ProduktIle;
		 }
     }

   }

}
function CheckForm(FormName){
   
   var frm = document.forms[FormName];
   
   if(FormName == 'produkty'){
       if(frm.razem.value == '' || frm.razem.value == '0') {
         alert('Select the product');
    	 return;
       }
   }

        if ( frm.elements['s[Vorname]'].value == '')
        {
           alert("Please fill in  'Name' field.");
           frm.elements['s[Vorname]'].focus();
           return;
        }
        if ( frm.elements['s[Nachname]'].value == '')
        {
           alert("Please fill in  'Surname' field.");
           frm.elements['s[Nachname]'].focus();
           return;
        }
        if ( frm.elements['s[Strase]'].value == '')
        {
           alert("Please fill in  'Street and number' field.");
           frm.elements['s[Strase]'].focus();
           return;
        }
        if ( frm.elements['s[Postleitzahl]'].value == '')
        {
           alert("Please fill in  'Zip/City' field.");
           frm.elements['s[Postleitzahl]'].focus();
           return;

        }
        if ( frm.elements['s[Land]'].value == '')
        {
           alert("Please fill in  'Country and State' field.");
           frm.elements['s[Land]'].focus();
           return;
        }
        if ( frm.elements['s[Land]'].value == '')
        {
           alert("Please fill in  'Tel. No.' field.");
           frm.elements['s[Land]'].focus();
           return;
        }
        if ( frm.elements['s[Email]'].value == '')
        {
           alert("Please fill in  'E-mail' field.");
           frm.elements['s[Email]'].focus();
           return;
        }
       frm.submit();
}
function ResetujSumy(){
   document.forms['produkty'].razem.value = 0;
   document.forms['produkty'].Calosc.value = 0;
   document.forms['produkty'].Calosc2.value = 0;
   document.forms['produkty'].Jednostka.value = '';
   document.forms['produkty'].KosztyPrzesylki.value = 0;
   document.forms['produkty'].SumaWag.value = 0;
}
-->


   


