//##############################################################################################//
// JavaScript library by Hans Lõugas © 2002. Created 2001, last update 02-02-2002
// You may use the functions in case you leave the author's note next to it.
// Visit: http://anc.diip.ee/wwwpub/jslib
//##############################################################################################//
// * Some functions by Dan Steinman (http://www.dansteinman.com/dynapi)
// * Some functions by Thomas Brattli (http://www.dhtmlcentral.com)
//##############################################################################################//
// Contents:
// * Window functions
//##############################################################################################//



//##############################################################################################//
// Window functions
//##############################################################################################//

//######  Creates pop-up window
function popUp(URL,w,h,scr) {
	if (scr == null || scr == 0)
		scr = 0;
	else
		scr = 1;
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL,'"+id+"','toolbar=0,scrollbars="+scr+",location=0,statusbar=0,menubar=0,resizable=0,width='+w+',height='+h);");
}
	
//######  Changes a frame's URL
function changeFrame(frameName, URL) {
	eval("parent."+frameName+".location"+"="+"'"+url+"'");
}

//######  Changes window location
function cU(URL) {
	window.location = URL;
}

//######  Changes browser location to current frame's location of necessary
function checkParent() { 
	if (parent != self) 
		top.location.href = self.location.href;
}