function getChannelPartners(url,country)
{
	xmlhttp.open("GET", url+"getChannelPartners.php?country="+country,true);
	xmlhttp.onreadystatechange=function()
	{
		if (xmlhttp.readyState==4)
		{
			
			if(xmlhttp.responseText == "null")
				document.getElementById('channelpartnerbox').style.display = "none";
			else
			{
				document.getElementById('channelpartnerbox').innerHTML = xmlhttp.responseText
				document.getElementById('channelpartnerbox').style.display = "";
			}


		}
	}
	xmlhttp.send(null)

}

function liveSearch()
{
	timerID = self.setTimeout('pauseApp(\"'+document.getElementById('q').value+'\")', 1000);
}

function pauseApp(un)
{
	if(un == document.getElementById('q').value)
	{
		if(document.getElementById('q').value == "")
		{
			document.getElementById('searchresults_menu').style.display = "none";
		}
		else
		{
			xmlhttp.open("GET", "/livesearch.php?q="+document.getElementById('q').value,true);
			xmlhttp.onreadystatechange=function()
			{
				if (xmlhttp.readyState==4)
				{
					document.getElementById('searchresults_menu').innerHTML = xmlhttp.responseText
					showMenu('searchresults');
				}
			}
			xmlhttp.send(null)
		}
	}
}

function showMenu(id)
{
	document.getElementById('solutions_menu').style.display = "none";
	document.getElementById('products_menu').style.display = "none";
	document.getElementById('downloads_menu').style.display = "none";
	document.getElementById('support_menu').style.display = "none";
	document.getElementById(id+'_menu').style.display = "";
	//alert(id+'_menu');
}

function hideMenu(id)
{
	document.getElementById('solutions_menu').style.display = "none";
	document.getElementById('products_menu').style.display = "none";
	document.getElementById('downloads_menu').style.display = "none";
	document.getElementById('support_menu').style.display = "none";
	//document.all[id+'_menu'].style.display = "none";

//for (x = 0; x < document.anchors.length; x++) {
//document.anchors[x].blur()
//}
}


function changeIt(message)
{
	window.status = message;
	return true;
}

function clearIt()
{
	window.status = "Done";
}


function rollover(id)
{
	//alert(id);
	var obj = document.getElementById(id).style;
	obj.borderTopColor = "White";
	obj.borderLeftColor = "White";
	obj.borderRightColor = "#404040";
	obj.borderBottomColor = "#808080";
	obj.background = "#B1D0DF";

}
function rollout(id)
{
	var obj = document.getElementById(id).style;
	obj.borderTopColor = "#0088B2";
	obj.borderLeftColor = "#0088B2";
	obj.borderRightColor = "#0088B2";
	obj.borderBottomColor = "#0088B2";
	obj.borderStyle = "solid";
	obj.borderWidth=1;
	obj.background = "#0088B2";

}

function showMenu(id)
{
	switch(id)
	{

		
		case "news": menuLeft = 200; break;
		case "solutions": menuLeft = 30; break;
		case "products": menuLeft = 130; break;
		case "downloads": menuLeft = 320; break;
		case "support": menuLeft = 400; break;
		case "searchresults": menuLeft = 527; break;
	}
	var tempvalue = 0;
	var tempvalue2 = 0;
	document.getElementById('solutions_menu').style.display = "none";
	document.getElementById('news_menu').style.display = "none";
	
	document.getElementById('products_menu').style.display = "none";
	document.getElementById('downloads_menu').style.display = "none";

	document.getElementById('support_menu').style.display = "none";
	document.getElementById(id+'_menu').style.display = "";

	tempvalue = windowSizes() - 750;
	//alert(tempvalue);
	tempvalue = tempvalue / 2;
	tempvalue2 = parseInt(tempvalue)+parseInt(menuLeft);
	document.getElementById(id+'_menu').style.left = tempvalue2;
}

function hideMenu(id)
{
	document.getElementById('solutions_menu').style.display = "none";
	document.getElementById('news_menu').style.display = "none";
	
	document.getElementById('products_menu').style.display = "none";
	document.getElementById('downloads_menu').style.display = "none";

	document.getElementById('support_menu').style.display = "none";
	//document.all[id+'_menu'].style.display = "none";

//for (x = 0; x < document.anchors.length; x++) {
//document.anchors[x].blur()
//}
}
/*
function rollover(id)
{
	//alert(id);
	var obj = document.getElementById(id).style;
	obj.borderTopColor = "White";
	obj.borderLeftColor = "White";
	obj.borderRightColor = "#404040";
	obj.borderBottomColor = "#808080";
	obj.background = "#B1D0DF";
}
function rollout(id)
{
	var obj = document.getElementById(id).style;
	obj.borderTopColor = "<?=$site_colour?>";
	obj.borderLeftColor = "<?=$site_colour?>";
	obj.borderRightColor = "<?=$site_colour?>";
	obj.borderBottomColor = "<?=$site_colour?>";
	obj.borderStyle = "solid";
	obj.borderWidth=1;
	obj.background = "<?=$site_colour?>";
}
*/
	function changeIt(message)
	{
		window.status = message;
		return true;
	}

	function clearIt()
	{
		window.status = "Done";
	}



	function OpenWindow(theURL,winName,features, myWidth, myHeight, isCenter)
	{
		if(window.screen)if(isCenter)if(isCenter=="true")
		{
			var myLeft = (screen.width-myWidth)/2;
			var myTop = (screen.height-myHeight)/2-50;
		    features+=(features!='')?',':'';
		    features+=',left='+myLeft+',top='+myTop;
		}
	window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
	}

function windowSizes()
{
var scr_w = screen.availWidth;
var scr_h = screen.availHeight;
var browseWidth, browseHeight;

var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));

if (is_nav){
   browseWidth=window.outerWidth;
   browseHeight=window.outerHeight;
}
if (document.layers){
   browseWidth=window.outerWidth;
   browseHeight=window.outerHeight;
}
if (document.all){
   browseWidth=document.body.clientWidth;
   browseHeight=document.body.clientHeight;
}
return browseWidth;
}

var agt=navigator.userAgent.toLowerCase();
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
		if (is_nav)	{ var extra = 712; } else {	var extra = 720; }

