xcord = 0
ycord = 0
var vmmtabnames = new Array(6)
vmmtabnames[0] = "help"
vmmtabnames[1] = "internet"
vmmtabnames[2] = "phone"
vmmtabnames[3] = "hosting"
vmmtabnames[4] = "billing"
vmmtabnames[5] = "faqs"

var vfolder = new Array(5)
vfolder[0] = "internet"
vfolder[1] = "phone"
vfolder[2] = "hosting"
vfolder[3] = "billing"
vfolder[4] = "faqs"


function fwindowlocation(){
		hmenuitem('help');
}

function htimeout(event){
vrunscript = 0
x=event.clientX
y=event.clientY

vmenuopen = 'help';

window.setTimeout("show_coords(x, y, vmenuopen)",500)
}

function show_coords(x, y, vmenuopen)
{
	if (y >= 205){
		hmenuitem(vmenuopen);
	}
}

function hmenuitem(vmenuitem){
	for (i=0; i<6; i++)
	{
		document.getElementById('v' + vmmtabnames[i] + 'none').style.display = 'block';
		document.getElementById('v' + vmmtabnames[i] + 'over').style.display = 'none';
		document.getElementById('sm' + vmmtabnames[i]).style.display = 'none';
	}
	document.getElementById('smhelp').style.display = 'none';
	document.getElementById('v' + vmenuitem + 'none').style.display = 'none';
	document.getElementById('v' + vmenuitem + 'over').style.display = 'block';
	document.getElementById('sm'  + vmenuitem).style.display = 'block';
}

function nospam(theuser, thetext) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@westnet.com.au\">' +
thetext + '</a>');
}

function nospamadd(theuser) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@westnet.com.au\">' +
theuser + '@westnet.com.au</a>');
}

function nospamstaff(theuser, thetext) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@staff.westnet.com.au\">' +
thetext + '</a>');
}

function nospamstaffadd(theuser) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@staff.westnet.com.au\">' +
theuser + '@staff.westnet.com.au</a>');
}


// 31/10/2005 HN:
		
var qsParm = new Array();

if (window.attachEvent) {
        window.attachEvent('onload', qs);
}
else if (window.addEventListener) {
        window.addEventListener("load", qs, false);
}
else {
        window.onload = qs();
}

function qs() 
{
	
	var query = window.location.search.substring(1);
	var parms = query.split('&');
	for (var i=0; i<parms.length; i++) 
	{
	
		var pos = parms[i].indexOf('=');
		if (pos > 0) 
		{
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
			qsParm[key] = val;
		}
	}
	
	if ((key) =="resellerid")
	{
		
		var lf = "\n";
		var CookieName= "agentID";
		var CookieString = document.cookie;
		var CookieSet = CookieString.split (';');
		var SetSize = CookieSet.length;
		var CookiePieces
		var ReturnValue = "";
		var x = 0;
		
	
	for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) {
		CookiePieces = CookieSet[x].split ('=');
		if (CookiePieces[0].substring (0,1) == ' ') {
			CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length);
		}
		
		if (CookiePieces[0] == CookieName) {
			ReturnValue = CookiePieces[1];
		}
	}
	
	if (ReturnValue=="")
	{
		createCookie("agentID",val,31);
	}
	}
			
	}
	
	function createCookie(name,value,days)
	{
		if (days)
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
			else var expires = "";
			document.cookie = name+"="+value+expires+"; path=/; domain=westnet.com.au";
	}

	function readCookie(name)
	{
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++)
		{
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}

	function eraseCookie(name)
	{
		createCookie(name,"",-1);
	}
