
if (document.images) {
	var last_rollover = null;
	var last_src;
	var loaded  = false;
	
	signup_r = new Image(142,33);
	signup_r.src = "/en/img/common/nav/signup_r.gif";
	
	findoutmore_r = new Image(142,33);
	findoutmore_r.src = "/en/img/common/nav/findoutmore_r.gif";
	
	pricing_r = new Image(141,33);
	pricing_r.src = "/en/img/common/nav/pricing_r.gif";
	
	download_r = new Image(142,32);
	download_r.src = "/en/img/common/nav/download_r.gif";
	
	topup_r = new Image(142,32);
	topup_r.src = "/en/img/common/nav/topup_r.gif";
	
	help_r = new Image(141,32);
	help_r.src = "/en/img/common/nav/help_r.gif";
		
	loaded = true;
}

function rollover(imgName) {
	if (loaded) {
		currImage = document.getElementById(imgName);
		newImage = eval(imgName + "_r");
		if ((typeof currImage == 'object') && (typeof newImage == 'object')) {
			last_rollover = currImage;
			last_src = last_rollover.src;
			last_rollover.src = newImage.src;
		}
	}
}

function rollout() {
	if (loaded && last_rollover) {
		last_rollover.src = last_src;
		last_rollover = null;
	}
}

function openWin(url, width, height, winName) {
	window.open(url, winName, 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width=' + width + ', height=' + height);
}

function close_window() {
	window.close();
}

function passwordFocus(oInput) {
	oInput.style.display = 'none';
	oInput.form.password.style.display = 'inline';
	oInput.form.password.focus();
}

function usernameFocus(oInput) {
	if (oInput.form.username.value == 'Username') {
		oInput.form.username.value = '';
	}
}

function writeFlash(id, path, width, height, imgpath, alt) {
	flash = '';
	if (MM_FlashCanPlay) {
		flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
		flash += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"';
		flash += ' id="' + id + '"';
		flash += ' width="' + width + '"';
		flash += ' height="' + height + '">';
		flash += '<param name="movie" value="' + path + '">';
		flash += '<param name="quality" value="best">';
		flash += '<param name="bgcolor" value="#ffffff">';
		flash += '<param name="wmode" value="transparent">';
		flash += '<embed src="' + path + '"';
		flash += ' quality="best"';
		flash += ' bgcolor="#ffffff"';
		flash += ' wmode="transparent"';
		flash += ' width="' + width + '"';
		flash += ' height="' + height + '"';
		flash += ' name="' + id + '"';
		flash += ' type="application/x-shockwave-flash"';
		flash += ' pluginspace="http://www.macromedia.com/go/getflashplayer">';
		flash += '<\/embed>';
		flash += '<\/object>';
	} else {
		flash += '<img src="swf/' + imgpath + '" width="' + width + '" height="' + height + '" border="0" alt="' + alt + '" />';
	}
	document.write(flash);
}

var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
			continue;
		var MM_PluginVersion = words[i];
	}
	var MM_FlashCanPlay = (MM_PluginVersion >= MM_contentVersion);
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function costcalc() {
	if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
		$h = 390;
	} else {
		$h = 500;
	}
	window.open('costcalc.php', 'costcalc', 'toolbar=no, width=730, height='+$h+', scrollbars=no, resize=no, menubar=no');
}

