function windowBorder(p,n){
	var t='<HTML><HEAD><TITLE>Intranet</TITLE><script>\n'+'p=function(){v1.document.bgColor=v2.document.bgColor=v3.document.bgColor=v4.document.bgColor="#000000";}\n'+'b=function(){if(frames.length>3)p();else setTimeout("b()",200);}\n'+'b();</script></HEAD>\n'+'<frameset border=0 framespacing=0 frameborder=0 cols="1,100%,1">\n'+'<frame name=v1 src="about:blank" scrolling=no noresize>\n'+'<frameset border=0 framespacing=0 frameborder=0 rows="1,100%,1">\n'+'<frame name=v2 src="about:blank" scrolling=no noresize frameborder=0 marginheight=0 marginwidth=0>\n'+'<frame name=main'+n+' src="'+p+'">\n'+'<frame name=v3 src="about:blank" scrolling=no noresize frameborder=0 marginheight=0 marginwidth=0>\n'+'</frameset>\n'+'<frame name=v4 src="about:blank" scrolling=no noresize frameborder=0 marginheight=0 marginwidth=0>\n'+'</frameset>\n'+'</HTML>';
	return t;
}


function newWindow(url,name,w,h,x,y,scrollbar){
	scrollbar=(scrollbar==null)?"no":"yes";
	w+=20;
	h+=20;
	var ie=(document.all);
	if(ie){w+=2;h+=2;}
	if (x==null) x=(screen.width-w)/2;
	if (y==null) y=(screen.height-h)/2;
	var purl=(ie)?"":url;
	var wp=ie?"1":"0,width="+w+",height="+h+",left="+x+",top="+y;
	var miv=window.open(purl,name,"toolbar=no,location=no,directories=no,status=no,scrollbars="+scrollbar+",resizable=no");
	if(ie){
		window.focus();
		miv.moveTo(5000,0);
		miv.v1=true;
		miv.document.write(windowBorder(url,name));
		miv.document.close();
		miv.resizeTo(w,h);
		miv.moveTo(x,y);
	}
	miv.focus();
	return miv;
}		

function newWindowModal(url,name,w,h,x,y,scrollbar){
	w+=20;
	h+=20;
	scrollbar=(scrollbar==null)?"no":"yes";
	var ie=(document.all);
	if(ie){w+=2;h+=2;}
	if (x==null) x=(screen.width-w)/2;
	if (y==null) y=(screen.height-h)/2;
	var purl=(ie)?"":url;
	var wp=ie?"1":"0,width="+w+",height="+h+",left="+x+",top="+y;
	var miv=showModalDialog(url,name,"toolbar=no,location=no,directories=no,status=no,scrollbars="+scrollbar+",resizable=no");
	if(ie){
		window.focus();
		miv.moveTo(5000,0);
		miv.v1=true;
		miv.document.write(windowBorder(url,name));
		miv.document.close();
		miv.resizeTo(w,h);
		miv.moveTo(x,y);
	}
	miv.focus();
	return miv;
}		

