function windowURL(url,param)
{
	var date = new Date();
	var name = date.getTime();

	window.open(url,name,param);
}

function windowFormToParent(form)
{
	if (window.opener != null)
	{
		if (window.opener.name == "") window.opener.name="main";
		form.target=window.opener.name;
	}

	form.submit();
}

function windowURLCentered(url, name, winwidth, winheight, param)
{
	var win = openWinCentered(name, url, winheight, winwidth, param);
}

function openWinCentered(winname, loc, heightt, widthh, params)
{  
   naver=navigator.appVersion;
   if(navigator.appName=="Microsoft Internet Explorer"&& 
      naver.substring(naver.indexOf("MSIE")+5,naver.lastIndexOf(';'))>'5.0')
   {
        tp=window.screenTop+Math.ceil((document.body.clientHeight-heightt)/2);
        lf=window.screenLeft+Math.ceil((document.body.clientWidth-widthh)/2);
	if (params.length > 0) params = "," + params;
        return window.open(loc,winname,"width="+widthh+",height="+heightt+",top="+tp+",left="+lf+params);
   }
   else if(navigator.appName=="Netscape"&& naver.substring(0,naver.indexOf(' '))>'4.0')
   {            
        tp=window.screenY+Math.ceil((window.innerHeight-heightt)/2);
        lf=window.screenX+Math.ceil((window.outerWidth-widthh)/2);
        tp+=window.outerHeight-window.innerHeight;
	if (params.length > 0) params = "," + params;
        return window.open(loc,winname,'width='+widthh+',height='+heightt+',top='+tp+',left='+lf+params);
   }
   else
   {
	return window.open(loc,winname);
   }
}

function openWinShifted(winname,heightt,widthh,loc,shiftx,shifty, params)
{
   naver=navigator.appVersion;
   
   if(navigator.appName=="Microsoft Internet Explorer" && 
      naver.substring(naver.indexOf("MSIE")+5,naver.lastIndexOf(';'))>'5.0')
   {
        tp=window.screenTop+shifty;
        lf=window.screenLeft+shiftx;
	if (params.length > 0) params = "," + params;
        window.open(loc,winname,"width="+widthh+" height="+heightt+" top="+tp+" left="+lf+params);
   }
   else if(navigator.appName=="Netscape" && naver.substring(0,naver.indexOf(' '))>'4.0')
   {            
        tp=window.screenY+shiftx;
        lf=window.screenX+shifty;
        tp+=window.outerHeight-window.innerHeight;
	if (params.length > 0) params = "," + params;
        window.open(loc,winname,'width='+widthh+',height='+heightt+',top='+tp+',left='+lf+params);
   }
   else window.open(loc,winname);
}

function openWinInMousePosition(heightt,widthh,loc,ex,ey, params)
{     
	tp=ey;
	lf=ex;                
	if (params.length > 0) params = "," + params;
	window.open(loc,"",'width='+widthh+',height='+heightt+',top='+tp+',left='+lf+params);
}

function ask_del(message,url) {
	res = confirm(message);
	if(res){
		document.location = url;
	}
} 