function Zamien()
{ //start
  var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
    for (rem=0; rem < (Zamien.arguments.length-2); rem+=3) {
           store = Zamien.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
    if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
        (store.indexOf('document.all[')==0 && document.all==null))
         store = 'document'+store.substring(store.lastIndexOf('.'),store.length);
         obj = eval(store);
    if (obj != null) {
             switcher[keep++] = obj;
      switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
      obj.src = Zamien.arguments[rem+2];
  } }
  document.Data = switcher;
} //end




function Przywroc()
{ //start
  if (document.Data != null)
    for (var rem=0; rem<(document.Data.length-1); rem+=2)
      document.Data[rem].src=document.Data[rem+1];
} //end



function WyczyscLcd()
{ //start
	document.lcd.src = 'img/naglowki_lcd/lcd_pusty.jpg';
} //end


 
 
function mailTo(u,d) {eval("window.location = 'mailto:" + u + "@" + d +"';");}
	
	



function flash_menu(){

		var so = new SWFObject("img/menu.swf", "menu", "155", "655", "8");
		//so.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
		so.useExpressInstall('img/expressinstall.swf');
		so.addParam("wmode", "transparent");
		so.write("kontent_lewy_menu_flash");
		

}



function ExternalLinks() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0;i<anchors.length;i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href")&&anchor.getAttribute("rel") == "external") anchor.target = "_blank";
  }
}




var newwindow;
function open_popup(url)
{
	newwindow=window.open(url,'name','scrollbars,height=628,width=500');
	if (window.focus) {newwindow.focus()}
}




var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}

//<body onload="fixPNG(document.img_rok_2007);fixPNG(document.img_rok_2006);fixPNG(document.img_rok_2005);fixPNG(document.img_rok_2004);">






function validate_form_kont() {
 res = true; 
 
	/* sprawdzenie poprawnosci emaila */
	email = /^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+/;
	
	
	if (document.formularz_kontakt.kto.value =='' ) {
	res = false;
	alert('Proszę wypełnić pole [Nadawca]');
	document.formularz_kontakt.kto.focus();	
	return false;
	}
	


	
	if (document.formularz_kontakt.temat.value =='' ) {
	res = false;
	alert('Proszę wypełnić pole [Temat]');
	document.formularz_kontakt.temat.focus();	
	return false;
	}	
	
	
	
	
		if (document.formularz_kontakt.tekst.value =='' ) {
	res = false;
	alert('Proszę wypełnić pole [Treść]');
	document.formularz_kontakt.tekst.focus();	
	return false;
	}	
	
	
	
 return res ;
 }



