<!-- //

function PokazOkno(adres, nazwa) {
		okno=window.open(adres, nazwa,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=400,height=450");
}

// na potrzeby podaj email w keysearch/kreator.php
function PokazOknoPE(adres, nazwa) {
		okno=window.open(adres, nazwa,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=460,height=320");
}

function bookmarkit() {
	window.external.addFavorite('http://www.loga-melodie.cz','www.loga-melodie.cz - největší výběr SMS');
}

function Okienko(url,x,y) {
	szerokosc = x;
	wysokosc = y;
	popup = window.open(url,'Okienko','toolbar=0,location=0,directories=0,scrollbars=0,status=0,menubar=0,resizable=no,width='+szerokosc+',height='+wysokosc);
	popup.moveTo(parseInt((screen.width-szerokosc)/2),parseInt((screen.height-wysokosc)/2));
	popup.focus();
}

function OknoKreator(url,szerokosc,wysokosc) {
  popupk = window.open(url,'Kreator','toolbar=0,location=0,directories=0,scrollbars=1,status=0,menubar=0,resizable=yes,width='+szerokosc+',height='+wysokosc);
  popupk.focus();
}

// obsluga powiekszenia obrazka z content na warstwie
doc=document;ie=doc.all;ns4=doc.layers;up5=doc.getElementById?doc.getElementsByTagName('div'):0;ns6=up5&&!ie
mX=0;mY=0;nTimerID=0;nTimerOpID=0;
function mouseMove(e){mX=event.x;mY=event.y;if (up5){mX+=document.body.scrollLeft;mY+=document.body.scrollTop;}}
if (ie) { document.onmousemove=mouseMove; }

function setPopupOp(nOp) {
	if (ie && nOp<=100) {
		ie.popup.style.filter="alpha(opacity="+nOp+")";
		nTimerOpID=setTimeout("setPopupOp(" +(nOp+20)+")",10);
	 }
}

function showPopupDivTimed(imgID,DestW,DestH,elementPath,strTitleName,strAuthorName) {
	//DestH = {DESTH};
	//DestW = {DESTW};
	nLeft = 0, nTop = 0;
	if (ie) { 
		if (ie.categoryID) ie.categoryID.style.visibility="hidden";
		if (ie.sizeID) ie.sizeID.style.visibility="hidden";
		if (ie.popupnumber) ie.popupnumber.innerHTML = ""+imgID;
		if (ie.popupnumber1) ie.popupnumber1.innerHTML = ""+imgID;
		if (ie.popupnumber2) ie.popupnumber2.innerHTML = ""+imgID;
		if (ie.authorName) ie.authorName.innerHTML = ""+strAuthorName;
		if (ie.titleName) ie.titleName.innerHTML = ""+strTitleName;
		
		if (ie.popupimg) ie.popupimg.src = elementPath+imgID;
        ie.popupimg.width = DestW;
        ie.popupimg.height = DestH;

        nWidth = DestW;
        nHeight = DestH;
		
		ie.popup.style.height=""+nHeight+"px";
		ie.popup.style.width=""+nWidth+"px";
		
		if (mX+nWidth+5<document.body.clientWidth+document.body.scrollLeft) {
			ie.popup.style.left = mX+5;
			nTop = ie.popup.style.top = mY-(nHeight/2);
			nTop = ie.popup.style.top=nTop<document.body.scrollTop?document.body.scrollTop:nTop;
			ie.popup.style.top=nTop+nHeight>document.body.clientHeight+document.body.scrollTop?(document.body.clientHeight+document.body.scrollTop)-nHeight:nTop;
		}
		else if (mX-nWidth-5>document.body.scrollLeft) {
			ie.popup.style.left = mX-nWidth-5;
			nTop = ie.popup.style.top = mY-(nHeight/2);
			nTop = ie.popup.style.top=nTop<document.body.scrollTop?document.body.scrollTop:nTop;
			ie.popup.style.top=nTop+nHeight>document.body.clientHeight+document.body.scrollTop?(document.body.clientHeight+document.body.scrollTop)-nHeight:nTop;
		}
		else if (mY+nHeight+5<document.body.clientHeight+document.body.scrollTop) {
			nLeft = ie.popup.style.left = mX-(nWidth/2);
			ie.popup.style.top = mY+5;
			nLeft = ie.popup.style.left=nLeft<document.body.scrollLeft?document.body.scrollLeft:nLeft;
			ie.popup.style.left=nLeft+nWidth>document.body.clientWidth+document.body.scrollLeft?(document.body.clientWidth+document.body.scrollLeft)-nWidth:nLeft;
		}
		else if (mY-nHeight-5>document.body.scrollTop) {
			nLeft = ie.popup.style.left = mX-(nWidth/2);
			ie.popup.style.top = mY-nHeight-5;
			nLeft = ie.popup.style.left=nLeft<document.body.scrollLeft?document.body.scrollLeft:nLeft;
			ie.popup.style.left=nLeft+nWidth>document.body.clientWidth+document.body.scrollLeft?(document.body.clientWidth+document.body.scrollLeft)-nWidth:nLeft;
		}
		else {
			nLeft=ie.popup.style.left=mX-(nWidth/2)>0?mX-(nWidth/2):0;
			ie.popup.style.left=(nLeft+nWidth>document.body.clientWidth+document.body.scrollLeft)?(document.body.clientWidth+document.body.scrollLeft)-nWidth:nLeft;
			(mY+5+nHeight)>(document.body.clientHeight+document.body.scrollTop)?ie.popup.style.top=mY-5-nHeight:ie.popup.style.top=mY+5;
		}
		ie.popup.style.visibility="visible";
		setPopupOp(40);
	}
}

function showPopupDiv(imgID,DestW,DestH,elementPath,strTitleName,strAuthorName) {
	if (!up5) return;
	clearTimeout(nTimerID);
	clearTimeout(nTimerOpID);
	nTimerID=setTimeout("showPopupDivTimed("+imgID+","+DestW+","+DestH+",'"+elementPath+"','" + (strTitleName.replace("'","\\'")).replace("\"","\\\"") + "','" + (strAuthorName.replace("'","\\'")).replace("\"","\\\"") + "')",200);
}

function hidePopupDiv() {
	clearTimeout(nTimerID);
	clearTimeout(nTimerOpID);
	if (ie) { 
		if (ie.categoryID) ie.categoryID.style.visibility="visible";
		if (ie.sizeID) ie.sizeID.style.visibility="visible";
		if (ie.popup) ie.popup.style.visibility="hidden";
	 }
}
// --> 