xcord = 0
ycord = 0
var vmmtabnames = new Array(6)
vmmtabnames[0] = "home"
vmmtabnames[1] = "technology"
vmmtabnames[2] = "why"
vmmtabnames[3] = "application"
vmmtabnames[4] = "products"
vmmtabnames[5] = "contact"

var vfolder = new Array(5)
vfolder[0] = "technology"
vfolder[1] = "why"
vfolder[2] = "application"
vfolder[3] = "products"
vfolder[4] = "contact"

function fwindowlocation(){
	vrunscript = 0
	var vpath = location.pathname.split("/");
	if(vpath[1] == 'index'){
		if(vpath[2] != null){
			for (i=0; i<5; i++)
			{
				if(vpath[2] == vfolder[i]){
					vrunscript = 1;
				}
			}
			if(vrunscript == 1){
				hmenuitem(vpath[2]);
			}
			else
			{
				hmenuitem('home');
			}
		}
	}
	else
	{
		hmenuitem('home');
	}
	
}

function htimeout(event){
x=event.clientX
y=event.clientY

var vpath = location.pathname.split("/");
	if(vpath[1] == 'index'){
		if(vpath[2] != null){
			for (i=0; i<5; i++)
			{
				if(vpath[2] == vfolder[i]){
					vrunscript = 1;
				}
			}
			if(vrunscript == 1){
				vmenuopen = vpath[2];
			}
			else
			{
				vmenuopen = 'home';
			}
		}
	}
	else
	{
		vmenuopen = 'home';
	}
	
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('smhome').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 + '@eosdglobal.com\">' +
thetext + '</a>');
}

function nospamadd(theuser) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@eosdglobal.com\">' +
theuser + '@eosdglobal.com</a>');
}

function nospamstaff(theuser, thetext) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@eosdglobal.com\">' +
thetext + '</a>');
}

function nospamstaffadd(theuser) {
document.write('<a href' + '=\"mail' + 'to:' + theuser + '@eosdglobal.com\">' +
theuser + '@eosdglobal.com</a>');
}


// 31/10/2005 HN: Fear my javascript skilz :)
		
var qsParm = new Array();

function qs() 
{
	//alert("fired");
	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")
	{
		//alert("fired2");
		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=="")
	{
	//	alert("not found!");
		createCookie("agentID",val,1);
	}
	}
			
	}
	
	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=/";
	}

	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);
	}