<!--
<!--
function displayWindow(imageName,imageWidth,imageHeight,alt,posLeft,posTop,nazwa)
{
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>Kartel S.A.</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	newWindow.document.write('<p align="center" valign="top"><img src='+imageName+' alt='+alt+'><br><span style="color: #FFFFFF;"><b>:: '+nazwa+' ::</b></span></p>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

//-->
function displayWindow2(url, width, height,scrollbars) {
 var Win=window.open(url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=' + scrollbars + ',menubar=no' );
 Win.moveTo(10,10);
 Win.resizeTo(width,height);
}
function setPointerbgColor(theRow, thePointerColor)
{
	if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
		return false;
	}
	if (typeof(document.getElementsByTagName) != 'undefined') {
		var theCells = theRow.getElementsByTagName('td');
	}
	else if (typeof(theRow.cells) != 'undefined') {
		var theCells = theRow.cells;
	}
	else {
		return false;
	}

	var rowCellsCnt  = theCells.length;
	for (var c = 0; c < rowCellsCnt; c++) {
		theCells[c].style.backgroundColor = thePointerColor;
	}

	return true;
}

function setPointerClass(theRow, thePointerClass)
{
//	if (thePointerClass == '' || typeof(theRow.style) == 'undefined') {
//		return false;
//	}
	if (typeof(document.getElementsByTagName) != 'undefined') {
		var theCells = theRow.getElementsByTagName('td');
	}
	else if (typeof(theRow.cells) != 'undefined') {
		var theCells = theRow.cells;
	}
	else {
		return false;
	}

	var rowCellsCnt  = theCells.length;
	for (var c = 0; c < rowCellsCnt; c++) {
		theCells[c].className = thePointerClass;
	}

	return true;
}

function powiekszZdjecie(imageName,posLeft,posTop)
{
	newWindow = window.open("","newWindow","width=100,height=100,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html>');
	newWindow.document.write('<head>');
	newWindow.document.write('<title>FCPK</title>');
	newWindow.document.write('<script type="text/javascript">  ');
	newWindow.document.write('function resize1() {');
	newWindow.document.write('var image1= new Image();');
	newWindow.document.write('image1.src = "'+imageName+'";');
	newWindow.document.write('if(image1.width==0 || image1.height==0) { setTimeout(\'resize1()\',100); }');
	//newWindow.document.write('alert(image1.width + \' - \' + image1.height);');
	newWindow.document.write('self.resizeTo(parseInt(image1.width+20),parseInt(image1.height+80));');
	newWindow.document.write('}');
	newWindow.document.write('  </script>');
	newWindow.document.write('</head>');
	newWindow.document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
	newWindow.document.write('<center><img src='+imageName+' name="Zdjecie"></center>');
	newWindow.document.write('<script type="text/javascript">setTimeout(\'resize1()\',100);</script>');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function prompt1(location,akcja,akcja2,nr_kat,korpus,defaultQuantity)
 {
 xajax_pobierz_ilosc_min(nr_kat);
 //document.getElementById("pr1").style.top=window.pageYOffset+10;
 document.getElementById("pr1").style.top=document.body.scrollTop+screen.availHeight/2-200;
 document.getElementById("pr1").style.left=screen.availWidth/2-150;
	//document.getElementById("pr1").style.top=screen.availHeight/2-200;
	document.getElementById("pr1").style.visibility="visible";
 document.getElementById('akcja').value = akcja;
 document.getElementById('akcja2').value = akcja2;
 document.getElementById('nr_kat').value = nr_kat;
 document.getElementById('korpus').value = korpus;
	document.getElementById('ilosc').focus();
 }

function testuj_logowanie()
 {
 if(document.Logowanie.Login.value != '' && document.Logowanie.Password.value == '')
  {
  document.Logowanie.Password.focus();
  return false;
  }
 if(document.Logowanie.Login.value == '' || document.Logowanie.Password.value == '')
  {
  alert('Proszę wpisać login i hasło!');
  return false;
  }
 }

 /**
  *
  * @access public
  * @return void
  **/
 function ustaw_koszyk()
  {
  document.getElementById("koszyk_korpus").style.left=screen.availWidth/2+244;
  document.getElementById("koszyk_korpus").style.top=105;
  document.getElementById("koszyk_korpus").style.visibility="visible";
  }

//-->
