var SynergenWindow = null;

function viewSynergenAsset(synid) {
        var idx = synid.indexOf("-");
        var prefix = synid.substring(0, idx);
        var suffix = synid.substring(idx+1);
                                        	
	if(suffix.length < 7) {
		suffix = "0" + suffix;
	}	
	var server = "cmms-prod-app1";
	
        var theUrl = "http://"+server+".ci.stpaul.mn.us:8091/synergen/Navigator?tgt=Navigator&plant=01&parent_department=&parent_asset_record_type=" + prefix + "&parent_asset_id=" + suffix + "&from_area=&from=110202453484322";
        //var theUrl = "http://viper.ci.stpaul.mn.us:8092/synergen/Navigator?tgt=Navigator&plant=01&parent_department=&parent_asset_record_type=" + prefix + "&parent_asset_id=" + suffix + "&from_area=&from=110202453484322";
        //var theUrl = "http://cobra.ci.stpaul.mn.us:8091/synergen/tgt=callForms&form_name=ASSET";
	if(SynergenWindow == null || SynergenWindow.closed) {
		SynergenWindow = window.open();
//		SynergenWindow.parent = null;
		SynergenWindow.opener = null;

	}
	SynergenWindow.location = theUrl;
	SynergenWindow.focus();
}

