if ((navigator.appName.indexOf("Internet Explorer") != -1) && (navigator.userAgent.indexOf("Opera") == -1)){
	bw_type = "ie";
}else if (navigator.appName.indexOf("Netscape") != -1){
	bw_type = "nn";
	if (parseInt(navigator.appVersion) >= 5){
		bw_type += "6";
	}
}else if (navigator.userAgent.indexOf("Opera") != -1){
	bw_type = "op";
	if(navigator.userAgent.indexOf("Opera 7") != -1){
		bw_type += "7";
	}
}else{
	bw_type="other";
}
if(bw_type == "ie" || bw_type == "nn6" || bw_type == "op7"){
	bw_ok = true;
}else{
	bw_ok = false;
}

function top(){ window.scrollTo(0,0); }

function wopen(_wurl,_wn,_ww,_wh,_wscrl){
	if(screen.width){
		wpos_x = (screen.width-_ww)/2;
		if (wpos_x < 0){ wpos_x = 0;}
		wpos_y = (screen.height-_wh)/2;
		if (wpos_y < 0){ wpos_y = 0;}
	}else{
		wpos_x = 0; wpos_y = 0;
	}
	if(_wn==""){
		_wn = "w_test";
	}
	window.open(_wurl,_wn,"alwaysRaised=0,top="+wpos_y+",left="+wpos_x+",height="+_wh+",width="+_ww+",menubar=0,resizable=0,scrollbars="+_wscrl+",status=0");
}

function printw(){
	if(screen.width){
		wpos_x = (screen.width-800)/2;
		if (wpos_x < 0){ wpos_x = 0;}
		wpos_y = (screen.height-544)/2;
		if (wpos_y < 0){ wpos_y = 0;}
	}else{
		wpos_x = 0; wpos_y = 0;
	}
	window.open("print.php?Url="+escape(window.location),
	"PrnWind",
	"alwaysRaised=1,top="+wpos_y+",left="+wpos_x+",height=544,width=800,menubar=1,resizable=1,scrollbars=1,status=0");
}