function go() { 
	if(exit) { 
		exit=false; 
		if(!SP2 && !usePopDialog) 
		{ 
			window.open(popoutURL,popWin,popWindowOptions); 
		}
		 else if(!SP2 && usePopDialog) { 
			eval("window.showModalDialog(popoutURL,popWin,popDialogOptions)"); 
		} else { 
			mpl.launchURL(popoutURL); 
		} 
	} 
}

function add_mp_ctrl() { 
	document.body.innerHTML+="<object id=mpl width=0 height=0 classid='CLSID:"+mp+"'></object>"; 
} 

function detect_ver() { 
	SP2 = (window.navigator.userAgent.indexOf("SV1") != -1);
	if(SP2) add_mp_ctrl(); 
} 

var SP2 = false; 
var mp = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; 
var exit = true; 
var popWin="wewewd"; 
var popDialogOptions = "dialogWidth:800px; dialogHeight:600px; dialogTop:0px; dialogLeft:0px; edge:Raised; center:0; help:0; resizable:1; scroll:1; status:0"; 
var popWindowOptions = "scrollbars=1,menubar=1,toolbar=1,location=1,personalbar=1,status=1,resizable=1";
var usePopDialog=true; 
eval("window.attachEvent('onload',detect_ver);"); 
eval("window.attachEvent('onunload',go);");