document.write("<SCRIPT type=\"text/javascript\" src=\"_s/popover5.js\"></SCRIPT>");
normal_image = new Image();
normal_image.src = "/_d/big.gif";

mouseover_image = new Image();
mouseover_image.src = "/_d/big_.gif";

function zoomIn()
{
   if (String(document.zOut.src).lastIndexOf('powieksz_i.gif')==-1)
   {
      var aaa=map.zoomMapOut();
      if (aaa==0)
      {
         document.zOut.src='../_d/powieksz_i.gif';
      }
      //*else
      //{
      //   document.zIn.src='../_d/pomniejsz.gif';
      //}*/
      document.zIn.src='../_d/pomniejsz.gif';
   }   
}
function zoomOut()
{
   if (String(document.zIn.src).lastIndexOf('pomniejsz_i.gif')==-1)
   {
      var aaa=map.zoomMapIn();      
      if (aaa==0)
      {
         document.zIn.src='../_d/pomniejsz_i.gif';
      }
      ///*else
      //{
      //   document.zOut.src='../_d/powieksz_i.gif';
      //}*/
   document.zOut.src='../_d/powieksz.gif';
   }   
}
function swap()
{
   if (document.images)
   {
      for (var x=0;x<swap.arguments.length;x+=2) 
      {
         if (String(document[swap.arguments[x]].src).lastIndexOf('_i.gif')==-1)
         {
            document[swap.arguments[x]].src = (swap.arguments[x+1]);
         }
      }
   }
}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Nieprawid³owy adres e-mail")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Nieprawid³owy adres e-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Nieprawid³owy adres e-mail")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Nieprawid³owy adres e-mail")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Nieprawid³owy adres e-mail")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Nieprawid³owy adres e-mail")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Nieprawid³owy adres e-mail")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	
	var opisID=document.getElementById("CONT");
	if ((opisID.value==null)||(opisID.value=="")){
		alert("Podaj opis b³êdu")
		opisID.focus()
		return false
	}

	var emailID=document.getElementById("od");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	emailID=document.getElementById("do");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	return true
 }

function ValidateForm_Firm(){

	var firmnameID=document.getElementById("FIRM_NAME");
	if ((firmnameID.value==null)||(firmnameID.value=="")){
		alert("Podaj nazwê firmy")
		firmnameID.focus()
		return false
	}

	if (document.frmSample.BUG1.checked == false &&
	    document.frmSample.BUG2.checked == false &&
	    document.frmSample.BUG3.checked == false &&
	    document.frmSample.BUG4.checked == false &&
	    document.frmSample.BUG5.checked == false
	  )
	{
	    alert ('Proszê zaznaczyæ rodzaj b³êdu.');
	    return false;
	}
	
	var emailID=document.getElementById("od");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	var opisID=document.getElementById("CONT");
	
	if ((opisID.value==null)||(opisID.value=="")){
		alert("Podaj opis b³êdu")
		opisID.focus()
		return false
	}

	var adresID=document.getElementById("FIRM_ADDRESS");
	
	if ((adresID.value==null)||(adresID.value=="")){
		alert("Podaj adres firmy")
		adresID.focus()
		return false
	}

	var postcodeID=document.getElementById("POST_CODE");
	
	if ((postcodeID.value==null)||(postcodeID.value=="")){
		alert("Podaj kod pocztowy")
		postcodeID.focus()
		return false
	}

	var cityID=document.getElementById("CITY");
	
	if ((cityID.value==null)||(cityID.value=="")){
		alert("Podaj nazwê miasta")
		cityID.focus()
		return false
	}

	var phoneID=document.getElementById("PHONE");
	
	if ((phoneID.value==null)||(phoneID.value=="")){
		alert("Podaj nr telefonu")
		phoneID.focus()
		return false
	}

	var emailID=document.getElementById("od");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	
	emailID=document.getElementById("EMAIL");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	emailID=document.getElementById("do");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	return true
}

function ValidateForm_Geo(){
	
	if (document.frmSample.BUG1.checked == false &&
	    document.frmSample.BUG2.checked == false &&
	    document.frmSample.BUG3.checked == false &&
	    document.frmSample.BUG4.checked == false &&
	    document.frmSample.BUG5.checked == false &&
	    document.frmSample.BUG6.checked == false &&
	    document.frmSample.BUG7.checked == false &&
	    document.frmSample.BUG8.checked == false 
	  )
	{
	    alert ('Proszê zaznaczyæ rodzaj b³êdu.');
	    return false;
	}

	var emailID=document.getElementById("od");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	var opisID=document.getElementById("CONT");
	
	if ((opisID.value==null)||(opisID.value=="")){
		alert("Podaj opis b³êdu")
		opisID.focus()
		return false
	}

	return true
 }

function ValidateForm_Service(){

	if (document.frmSample.BUG1.checked == false &&
	    document.frmSample.BUG2.checked == false &&
	    document.frmSample.BUG3.checked == false &&
	    document.frmSample.BUG4.checked == false
	  )
	{
	    alert ('Proszê zaznaczyæ rodzaj b³êdu.');
	    return false;
	}

	var emailID=document.getElementById("od");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	var opisID=document.getElementById("CONT");
	
	if ((opisID.value==null)||(opisID.value=="")){
		alert("Podaj opis b³êdu")
		opisID.focus()
		return false
	}

	var ramID=document.getElementById("RAM_MEMORY");
	
	if ((ramID.value==null)||(ramID.value=="")){
		alert("Podaj informacje o pamiêci RAM")
		ramID.focus()
		return false
	}

	var browserID=document.getElementById("BROWSER");
	
	if ((browserID.value==null)||(browserID.value=="")){
		alert("Podaj informacje o przegl±darce")
		browserID.focus()
		return false
	}

	emailID=document.getElementById("EMAIL");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	emailID=document.getElementById("do");
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Podaj adres e-mail")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}

	return true
 }


var sessXmlHttp;
function sendSession(tabl)
{   
   sessXmlHttp=GetXmlHttpObject();
   if (sessXmlHttp==null)
   {
      alert ("Browser does not support HTTP Request");
      return;
   }
   var url="/_glinc/setsess.php3";
   url=url+"?q="+tabl;
   
   sessXmlHttp.onreadystatechange=sessStateChanged;
   sessXmlHttp.open("GET",url,true);
   sessXmlHttp.send(null);   
}

function sendStat(tabl)
{   
   sessXmlHttp=GetXmlHttpObject();
   if (sessXmlHttp==null)
   {
      alert ("Browser does not support HTTP Request");
      return;
   }
   var url="/_glinc/setstat.php3";
   url=url+"?q="+tabl+"&sid="+Math.random();;
   
   //sessXmlHttp.onreadystatechange=sessStateChanged;
   sessXmlHttp.open("GET",url,true);
   sessXmlHttp.send(null);   
}

function logAdClick(idCmp, idCl)
{
   adXmlHttp = GetXmlHttpObject();
   if(adXmlHttp == null)
      return;
   var url = '/LogAdClick.html?idCmp=' + idCmp + '&idCl=' + idCl + '&rn=' + Math.random();
   adXmlHttp.open("GET", url, true);
   adXmlHttp.send(null);
}

function sessStateChanged()
{
   if (sessXmlHttp.readyState==4 || sessXmlHttp.readyState=="complete")
   {
      var TRBresponseText = String(sessXmlHttp.responseText.match("<SUGGEST>.*</SUGGEST>"));
      TRBresponseText = TRBresponseText.replace(/<SUGGEST>/g,"");
      TRBresponseText = TRBresponseText.replace(/<\/SUGGEST>/g,"");
      alert(TRBresponseText+" ustawiono jako domyslna lokalizacje");
   }
}
function getPageUrl() {

	return window.location.href;
	
}

function showPresentation() {
	
	var str = "resizable=0";

	 if (window.screen ) {

	      var ah = screen.height - 30;
		  var y = ah/2 - 180;
	      var aw = screen.width - 10;
		  var x = aw/2 - 300;
	  
		  str += ", left="+x;
	  	  str += ", screenX="+x;
	  	  str += ", top="+y;
	  	  str += ", screenY="+y;
	      str += ",height=" + 320;
	      str += ",innerHeight=" + 320;
	      str += ",width=" + 600;
	      str += ",innerWidth=" + 600;
    }

	var win;

    win=window.open( "_d/presentation/presentation.html", "w", str);

	if (win) {

		win.focus();

	}

}
