<!-- 
/* javascript-WEBCUMULUS */

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function preload(imgObj,imgSrc){
    eval(imgObj+' = new Image()')
    eval(imgObj+'.src = "'+imgSrc+'"')}

function none(){}


// DRUKUJ
function drukuj(){
if (!window.print){
alert("Musisz mieæ NS4.x lub IE5,\naby u¿yæ przycisku drukowania!")
return
}
window.print()
window.close()
//history.go(-1)
}


function openWin (path,Xsiz,Ysiz,scrBar) {
	var przed = "";
	if (!(Xsiz > 0)) {
		Xsiz = 460;
		przed = "zoom.php?path=";
	}
	if (!(Ysiz > 0)) { Ysiz = 350; }
	if (scrBar == "") { scrBar = "no"; }

	window.open(przed+path, "fotozoom", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scrBar+",resizable=yes,fullscreen=no,channelmode=no,width="+Xsiz+",height="+Ysiz+",top=10,left=10");
	void(0);
}

function openOp(cOp) {
	on = (cOp < 10)?"0"+cOp:cOp;
	openWin ("/mm/opinie/"+on+".gif");
	return false;
}
			
// OKNO
function okno(url) {
    window.open( url, 'Okno', 'width=720,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1');
}
function oknoBar(url) {
    window.open( url, 'Okno', 'width=720,height=600,toolbar=1,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1');
}

//  PODMIANA WARSTW

 function toggle_div(nr,ilosc)  { 
  for (i=1; i<ilosc+1; i++){ eval ("document.getElementById('d" + i + "').style.display = 'none'"); }
	eval("document.getElementById('d" + nr + "').style.display = ''");
	eval("document.getElementById('d" + nr + "').style.position.top = '100'");	
	}
	//document.getElementById('d1').style.display = 'none'

function toggle_div2(nr,ilosc) {
  for (i=1; i<ilosc+1; i++){
			eval("document.getElementById('nd" + i + "').src = nd" + i + "_off.src");
			eval("document.getElementById('d" + i + "').style.display = 'none'");}
	eval("document.getElementById('d" + nr + "').style.display = ''");
  eval("document.getElementById('nd" + nr + "').src = nd" + nr + "_on.src");
}

 function toggle_none(nr,ilosc)  { 
	window.setTimeout("toggle_div("+ nr +","+ilosc+")",2000);
	}
// LOSOWA PODMIAN ZDJEC W NAGLOWKU

var time = 10000;
function Podmiana() {
  var nr = Math.floor(Math.random() * images) + 1;
	document.photo.src = eval("photo0"+nr+".src");
	window.setTimeout('Podmiana()',time);}

// MAIL

function msg() {
document.mailer.action = "mailto:" 
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value);
}

// STYLE MENU
function getObj(id){
  if (document.all) obj = eval ('document.all.' + id);
  else obj = document.getElementById(id);
  return obj;
	}

function setStyle(item,style){
  obj = getObj(item + '_A');  obj.className = style;
  obj = getObj(item + '_TD'); obj.className = style;
	}


//PODMIANA GALERII
function galeria(content){
gallery_content = content;
if (iedom) cross_scroll.style.left=0
	 else ns_scroll.left=0
actualwidth=''
fillup() 
}

function openImage(name,width,height,text){
var autoclose = true
var title =  "Galeria zdjêæ"
winW = (ns4)? window.innerWidth-16 : document.body.offsetWidth-20
winH = (ns4)? window.innerHeight : document.body.offsetHeight
var windowW=width+150
var windowH=height+160
var windowX = (winW-windowW)/2
var windowY = (winH-windowH)/2

    NFW = window.open("","popFrameless","width="+windowW+",height="+windowH)     
    NFW.blur()
    window.focus()       
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
    var frameString=""+
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\""+
"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"+
"<html><head><title>"+title+"</title>"+
"<meta http-equiv=Content-Type content=\"text/html; charset=iso-8859-2\">"+
"<meta name=\"language\" content=\"pl\" />"+
"<meta name=author content=\"Webcumulus  http://www.webcumulus.pl e-mail:biuro@webcumulus.pl\">"+
"<link rel=\"stylesheet\" href=\"css/s.css\" type=\"text/css\" media=\"screen\" />"+
"</head><body class=galeria><div align=center>"+
"<img src=photo/"+name+".jpg width="+width+" height="+height+" hspace=0 vspace=10 border=1><dd>"+
text+"<div id=\"Navigation\">&laquo;&nbsp;<a href=\"javascript:void(window.close())\">zamknij</a></div></body></html>"
    NFW.document.open();
    NFW.document.write(frameString)
    NFW.document.close()
  
  NFW.focus()   
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}



function toggleVisibilityById(id) {
	if (document.getElementById(id) == null) return;
	if (document.getElementById(id).style.display == '') {
		document.getElementById(id).style.display = 'none';
	} else {
		document.getElementById(id).style.display = '';
	}
	return false;
}

function hideByID(id) {
	document.getElementById(id).style.display = 'none';
	return false;
}

function unhideByID(id) {
	document.getElementById(id).style.display = '';
	return false;
}

function hideElementsByName(t,id) {
	var tags = document.getElementsByTagName(t);
	for (var i = 0; i < tags.length; i++) {
		if(tags[i].getAttribute("name")==id)
		{
				tags[i].style.display = 'none';
		}
	}
	return false;
}

function unhideElementsByName(t,id) {
	var tags = document.getElementsByTagName(t);
	for (var i = 0; i < tags.length; i++) {
		if(tags[i].getAttribute("name")==id)
		{
				tags[i].style.display = '';
		}
	}
	return false;
}

