// popup normal

function pop(adr, w, h){
window.open(adr,'ZigZap','toolbar=no,menubar=no,location=no,personalbar=no,scrollbars=yes,directories=no,status=no,resizable=yes,width='+w+',height='+h);
}

// popup z obrazkiem

function pop_img (plik,szer,wys,tytul) {
	ustawienia = 'width=' +  szer  + ',height=' +  wys  ;
	var okono = window.open ( '/popup-all.php?plik=' + plik + '&tytul=' + tytul ,'okk',ustawienia) ;
	okono.focus() ;
}

// pozycjonowanie ad layera

function centerDiv(divName){
	if (window.innerWidth&&window.innerHeight){
		var w=window.innerWidth;
		var h=window.innerHeight;
	} else {
		var w=document.body.clientWidth;
		var h=document.body.clientHeight;
	}
	var o=document.getElementById(divName);
	var cx=parseInt(o.style.width);
	o.style.left=((w/2-cx/2)-456)+"px";
}

// link do gadzetow

function gadzetLink(idObrazka) {
znin = '<input type="text" class="gadzInput" onClick="javascript:this.focus();this.select();" value=\'<a href="http://www.zigzap.tv" target="_blank">';
znot = '</a>\'  readonly="true">';
gadzetEl = document.getElementById(idObrazka);
gadzetKod = znin + gadzetEl.src + znot ;
return document.write(gadzetKod);
}


// logowanie

function logspr () {

	if ( document.login.nick.value == '' ) {
	alert ('Podaj nick!');
	document.login.nick.focus();
	return false;
	}
	
	if ( document.login.pass.value == '' ) {
	alert ('Podaj haslo!');
	document.login.pass.focus();
	return false;
	}
}