function load() {
if (GBrowserIsCompatible()) {
         var map = new GMap2(document.getElementById("map"));
         map.addControl(new GSmallMapControl());
         var MapTypes = map.getMapTypes();
         MapTypes[0].getName= function() { return "Mapa";}
         MapTypes[1].getName = function() { return "Satelitarna";}
         MapTypes[2].getName = function() { return "Hybrydowa";}
         map.addControl(new GMapTypeControl());
         map.setCenter(new GLatLng(52.23703821892911, 20.99040448665619), 15);
	     var marker = new GMarker(new GLatLng(52.23703821892911, 20.99040448665619));
         map.addOverlay(marker); 

}
} 


function reload(where) {		

	window.location = where;

}





function getEvent(oEvent) {

	if(oEvent) {

		oImageSelect = oEvent.target;

	} else {

		oImageSelect = window.event.srcElement;

	}

	return oImageSelect;

}



function setAction(form,action) {

	form.action.value = action;

}



function isEmpty(string) {

	var i,c,count=0,str = string;

	if (str.length == 0 | str == '' | str == null) return true;

	for(i = 0;i < str.length;i++) if (str.charAt(i) == ' ') count++; else return false;

	if (count == str.length) return true;

}



function isEmail(str) {

	return ( str.indexOf( '@' ) == -1  ? false : true );

}



function imageOn(event) {

  oImageSelect = getEvent(event);

  oImageSelect.className = "redborder";

}



function init () {

obj=document.getElementById('imgHolder');

divs=obj.getElementsByTagName('div');

	for(i=0;i<divs.length;i++) {

		divs[i].onclick=imageOn;

	}	

}





function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.

   {

   for(var i=0; i<document.images.length; i++)

      {

	  var img = document.images[i]

	  var imgName = img.src.toUpperCase()

	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")

	     {

		 var imgID = (img.id) ? "id='" + img.id + "' " : ""

		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""

		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "

		 var imgStyle = "display:inline-block;" + img.style.cssText 

		 if (img.align == "left") imgStyle = "float:left;" + imgStyle

		 if (img.align == "right") imgStyle = "float:right;" + imgStyle

		 if (img.parentElement.href) imgStyle = "cursor:pointer;" + imgStyle		

		 var strNewHTML = "<span onclick='alert(\"tekst\");' " + imgID + imgClass + imgTitle

		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"

	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"

		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"'></span>" 

		 img.outerHTML = strNewHTML

		 i = i-1

	     }

      }

   }



function bonk() {

	alert("studio");

}

function menu() {



	var menu,divs;

	menu=document.getElementById('_menu');

	divs=menu.getElementsByTagName('div');

	for(i=0;i<divs.length;i++) {	

		//divs[i].onclick=imageOn;

		divs[i].onclick = bonk;

	}	

}



 

function init() {

//	correctPNG();	

	//menu();

	//document.getElementById('test').onclick = alert("babakaaaka");

}  



window.onload = init;   

//window.attachEvent("onload", correctPNG);







a[0] = 'menu_off_redakcja.jpg';

a[1] = 'menu_off_nowsci.jpg';

a[2] = 'menu_off_archiwum.jpg';

a[3] = 'menu_off_220.jpg';

a[4] = 'menu_off_dzialeksperta.jpg';

a[5] = 'menu_on_redakcja.jpg';

a[6] = 'menu_on_nowosci.jpg';

a[7] = 'menu_on_archiwum.jpg';

a[8] = 'kontakt_on.gif.jpg';

a[9] = '';





function imgBuffer(arr) {

	for (i=0;i< arr.length ; i ++ ) {

	  (new Image()).src = 'images/'+ arr[i];    

	}   

return;

}
