function createPictureWindow(_pic,_width,_height) {
	wTop = (screen.height-_height)/3;
	wLeft = (screen.width-_width)/2;
	WinFeatures = "top="+wTop+",left="+wLeft+",width="+_width+",height="+_height+",maximize=no,minimize=no,Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no,resize=no";
	_newPicture = window.open("zoom.php?id="+_pic+"&dir=pictures","frontendPictureWindow",WinFeatures);
}

function createDynamicWindow(Path,Width,Height,Title)
{
	var p = Math.ceil(Math.random()*10000);
	var q = Math.ceil(Math.random()*p);
	windowName = p+'X'+(Width*p)+(Height*q);
	WinFeatures = "top="+(screen.height-Height)/2+",left="+(screen.width-Width)/2+",width="+Width+",height="+Height+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no";
	w = window.open("",windowName,WinFeatures);
	w.document.open();
	w.document.write('<head><title>'+Title+'</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></head>');
	w.document.write("<body bgcolor='#FFFFFF' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><img src='"+Path+"' height='"+Height+"' width='"+Width+"' alt='&quot;"+Title+"&quot;'></body>"); 
	w.document.close();
}

function createDescriptionWindow(_file,_width,_height)
{
	wTop = (screen.height-_height)/3;
	wLeft = (screen.width-_width)/2;
	WinFeatures = "top="+wTop+",left="+wLeft+",width="+_width+",height="+_height+",maximize=no,minimize=no,Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes,resize=no";
	_newDescription = window.open(_file,"frontendDescriptionWindow",WinFeatures);
}
// ---------------------------------------Browser determination----------------------------------------------//

dom = (document.getElementById);
IE4x = (document.all && (parseInt(navigator.appVersion) >= 4 ));
NC4x = (document.layers && (parseInt(navigator.appVersion) >= 4 ));
br4x = (parseInt(navigator.appVersion) >= 4);
