function getSiURL(){
		location.href = getPrivatePegasusHost() + '/si/siMenu.nyk?localOffset='+getLocalOffSet(); 
}

function btnOnMouseOver(source) {
	source.className = "activeButtonHover";
}

function btnOnMouseOut(source) {
	source.className = "activeButton";
}

function enlarge(img) {
var suffix = {
	"spanish":"es",
	"japanese":"jp",
	"chinese":"ch",
	"korean":"ko"
};
var url = document.location.pathname;
var locale = "";
	if (img.indexOf("app_mini_") > -1) {
		var pos = img.indexOf('app_mini_') + 9;
		img = img.substr(pos);
		img = img.replace(/\.gif/i,"");
		pos = img.indexOf('_');
		if (pos > -1) {
			var extra = img.substr(pos+1);
			var isLang = false;
			for (var c in suffix) if (suffix[c]==extra) isLang = true;
			if (isLang) img = img.substr(0,pos);
		}
		var foreign = url.lastIndexOf('_');
		if (foreign > -1) {
			foreign++;
			locale = url.substr(foreign,url.indexOf('.',foreign)-foreign);
			img += "_" + suffix[locale];
		}
		window.open("preview.html?"+img,"Application_Preview");
	}
}

function printFlash(movie,movieWidth,movieHeight) {
var protocol = (!document.location.protocol||document.location.protocol.indexOf("http")<0) ? "http:" : document.location.protocol;
var buffer = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+movieWidth+'" height="'+movieHeight+'">\n';
	buffer += '<param name="movie" value="'+movie+'" />\n';
	buffer += '<param name="quality" value="high" />\n';
	buffer += '<embed src="'+movie+'" quality="high" pluginspage="'+protocol+'//www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="'+movieWidth+'" height="'+movieHeight+'"></embed>\n';
	buffer += '</object>\n';
	document.write(buffer);
}

function validateForm(form) {
var ret = true;
	if (document.forms[form]) {
		var obj = document.forms[form];
		if (obj.userID) {
			if (obj.userID.value == "") {
				ret = false;
				alert("Please enter your User ID.");
				obj.userID.focus();
			}
		}
		if (obj.eMail && ret) {
			if (obj.eMail.value == "") {
				ret = false;
				alert("Please enter your e-Mail Address.");
				obj.eMail.focus();
			}
		}
	}
return ret;
}

function openHelp(app) {
if (!app) return;
var width = 800;
var height = 575;
var chromeWidth = 10;
var chromeHeight = 50;
var x = (screen.width/2) - ((width+chromeWidth)/2);
var y = (screen.height/2) - ((height+chromeHeight)/2);
var url = app;
	app = app.toLowerCase();
		if (app == "ct") {
			url = "/help/cont_track/about.html";
		} else if (app == "vs") {
			url = "/help/vessel_schedules/highlights.html";
		}
	window.helpHWND = window.open(url,'Help','menubar=no,location=no,resizable=no,scrollbars=yes,status=yes,top='+y+',left='+x+',width='+width+',height='+height);
	window.helpHWND.focus();
}