document.getElementsByClassName = function (needle)
{
  var         my_array = document.getElementsByTagName("*");
  var         retvalue = new Array();
  var        i;
  var        j;

  for (i = 0, j = 0; i < my_array.length; i++)
  {
    var c = " " + my_array[i].className + " ";
    if (c.indexOf(" " + needle + " ") != -1)
      retvalue[j++] = my_array[i];
  }
  return retvalue;
}

function addEvent(obj, evType, fn)
{
	if (obj.addEventListener)
	{
		obj.addEventListener(evType, fn, true);
		return true;
	} 
	else if (obj.attachEvent)
	{
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} 
	else 
	{
		return false;
	}
}

function printPageOld() {
	u=window.location.href;
	//alert(u);
	width=500;
	height=600;
	 Win = window.open(u,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );
	Win.hideForPrint();
	//el1=document.getElementById('MainDiv');
	//alert(el1);
	return;
}

function printPage() {
	
	window.print();
}


function Togglediv(divName) {
alert(document.getElementById(divName).style.display);
	if (document.getElementById(divName).style.display == "none") {
		 Showdiv(divName) ;
		}
	else {
		Hidediv(divName) ;
	}
} 

function Showdiv(divName) 
{ 

with (document.getElementById(divName).style) 
	{ 
	 display = "block"; 
	}
} 
function Hidediv(divName) 
{ with (document.getElementById(divName).style) 
	{ 
	 display = "none"; 
	}
} 
 
 

	
	function onLoadFunctions(){
		
		}


function hideAllOferta(){
	//hide all
	for(i=0;i<mainSections.length;i++){
		Hidediv(mainSections[i]);
		}
	
	}
	function showAllOferta(){
	//hide all
	for(i=0;i<mainSections.length;i++){
		Showdiv(mainSections[i]);
		}
	
	}
function switchTo(divName){
	if(document.getElementById(divName).style.display == "none"){
		showD=true;
		Showdiv(divName);
	}else{
		showD=false;
			Hidediv(divName);
	}
	
	hideAllOferta();
	if(showD){ 
		Showdiv(divName);
	}else{
		Hidediv(divName);
	}
	
	
}
	var count=1;
	function goTo(link){
		win=window.open(link,'externalWin');
		}
		
		function sw(zdjecie,w,h){
s=new Date();
URLzdjecia=zdjecie;
width=eval(w)+5;
height=eval(h)+5;
parametry='width='+width+', height='+height;
nazwaOkna="zdjecie"+s.getTime();
//nazwaOkna="zdjecie"+zdjecie;
tresc="<html><head><title>Mapka dojazdu</title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-2'></head><body style='margin:0; padding:0; background-color:#ffffff'><table width='100%' height='100%'><tr><td align='center' valign='middle'><img src="+URLzdjecia+" onClick='self.close();' alt='Kliknij, aby zamkn±c'></td></tr></table></body></html>";

nazwa= window.open('',nazwaOkna,parametry);
top.nazwa.document.writeln(tresc);
}


		
		pretty_window = null;
			function openWindow(){
  		 pretty_window = window.open('','admSend_window','width=400,height=147');
		   return true;
}

 