function init()
{
	document.styleSheets[1].disabled=true;
	var scrn = 94/100* screen.width;
	scrn=scrn-176;
	document.getElementById("footer").style.width=scrn+"px";
	url_split();
	$('#aboutUs').corner("Round");
	$('#contactUs').corner("Round");
	$('#clients').corner("Round");
	$('#pressKit').corner("Round");
	$('#recognitions').corner("Round");
}
function hover(x)
{
	var temp=""+x.src;
	temp=temp.split("/");
	temp=temp[temp.length-1].split(".");
	x.src="images/hover_"+temp[0]+".jpg";
}
function out(x)
{
	var temp=""+x.src;
	temp=temp.split("/");
	temp=temp[temp.length-1].split(".");
	temp=temp[0].split("_");
	x.src="images/"+temp[1]+".jpg";
}
function url_split()
{
	durl = document.URL;
	componentList = durl.split('#');
	doc = componentList[componentList.length-1];
	componentList = doc.split('.');
	doc = componentList[0];
	if (componentList.length==1 || doc=="")
		i=1;
	else
		$('html, body').animate({scrollTop: $("#"+doc).offset().top}, 1000);
}
function ajax(page)
{
	xhr=get_connection();
	document.getElementById("clients").innerHTML="<center><img src='images/loading.gif' height='30px' widht='30px'><br><span style='font-size:15px; color:#666666;'>Loading...</span></center>";

	 if (xhr) 
	 {
        xhr.onreadystatechange = setContent;
        xhr.open("GET", ""+page, true);
        xhr.send(null);
     }
     else {
        alert("Sorry, but I couldn't create an XMLHttpRequest");
     }
		return false;
}
function get_connection()
{
	var xhr=false;	
	 if (window.XMLHttpRequest)
	 {
        xhr = new XMLHttpRequest();
     }
     else 
	 {
        if (window.ActiveXObject) 
		{
           try 
		   {
              xhr = new ActiveXObject ("Microsoft.XMLHTTP");
			}
              catch (e) { }
        }
     }
	 return (xhr);
}
function setContent() 
{
	 if (xhr.readyState == 4) 
	 {
		document.getElementById("clients"). innerHTML = xhr.responseText;
		document.getElementById("clients").style.height = "1700px";
	 }
}
function hoverNav(x, left)
{
	x.style.backgroundPosition=""+left+"px -40px";
}
function outNav(x, left)
{
	x.style.backgroundPosition=""+left+"px 0px";
}
