
	/*
	 website - KSA.com
	 file type - js file
	 ¨2005-06 - website done south5.com
	 file name - js_nav.js
	*/

	<!-- //
        ns = (document.layers)? true:false;
		ie = (document.all)? true:false;
    //-->

	// This is the JavaScript for the text rollover of the two sections - 
	// preloading of all the images for the rollovers
	
	link_image0 = new Image();
	link_image0.src = "images/navigation/text_home_bn.gif";

	link_mouseover_image0 = new Image();
	link_mouseover_image0.src = "images/navigation/text_home_bd.gif";

	link_image1 = new Image();
	link_image1.src = "images/navigation/text_btn_projects_bn.gif";

	link_mouseover_image1 = new Image();
	link_mouseover_image1.src = "images/navigation/text_btn_projects_bd.gif";
			
	link_image2 = new Image();
	link_image2.src = "images/navigation/text_btn_about_bn.gif";

	link_mouseover_image2 = new Image();
	link_mouseover_image2.src = "images/navigation/text_btn_about_bd.gif";
	
	link_image3 = new Image();
	link_image3.src = "images/navigation/text_btn_contact_bn.gif";

	link_mouseover_image3 = new Image();
	link_mouseover_image3.src = "images/navigation/text_btn_contact_bd.gif";

	link_image4 = new Image();
	link_image4.src = "images/navigation/text_2ndN_btn_res.gif";
	
	link_mouseoverBtn_image4 = new Image();
	link_mouseoverBtn_image4.src = "images/navigation/text_2ndN_btn_res_bd.gif";

	link_image5 = new Image();
	link_image5.src = "images/navigation/text_2ndN_btn_mstp.gif";
	
	link_mouseoverBtn_image5 = new Image();
	link_mouseoverBtn_image5.src = "images/navigation/text_2ndN_btn_mstp_bd.gif";

	link_image6 = new Image();
	link_image6.src = "images/navigation/text_2ndN_btn_sts.gif";
	
	link_mouseoverBtn_image6 = new Image();
	link_mouseoverBtn_image6.src = "images/navigation/text_2ndN_btn_sts_bd.gif";
	
	link_image7 = new Image();
	link_image7.src = "images/navigation/text_2ndN_btn_inst.gif";
	
	link_mouseoverBtn_image7 = new Image();
	link_mouseoverBtn_image7.src = "images/navigation/text_2ndN_btn_inst_bd.gif";
	
	link_image8 = new Image();
	link_image8.src = "images/navigation/text_2ndN_btn_com.gif";
	
	link_mouseoverBtn_image8 = new Image();
	link_mouseoverBtn_image8.src = "images/navigation/text_2ndN_btn_com_bd.gif";

	
	
	
	
	
	//link_image7 = new Image();
	//link_image7.src = "images/general/clear.gif";
	
	//link_tabBtn_image7 = new Image();
	//link_tabBtn_image7.src = "images/navigation/text_2ndN_btn_com_bd.gif";
	
	// This is the function that allows the swapping of the text on the first
	// level of the nav (projects, about and contact)
	
	function swap()
	{
		if (document.images)
		{
			for (var x=0; x<swap.arguments.length; x+=2) 
			{
				document[swap.arguments[x]].src = eval(swap.arguments[x+1] + ".src");
			}
		}
	}

	// The next three functions are to be able to show the second level of the
	// top nav when you rollover projects

	function MM_reloadPage(init) 
	{ //reloads the window if Nav4 resized
		if (init==true) with (navigator) 
		{
			if ((appName=="Netscape")&&(parseInt(appVersion)==4)) 
			{
				document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; 
			}
		}
		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);

	function MM_findObj(n, d) 
	{ //v4.01
		var p,i,x; if(!d) d=document; 
		if((p=n.indexOf("?"))>0&&parent.frames.length) 
		{
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
		}
		if(!(x=d[n])&&d.all) x=d.all[n]; 
		for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_showHideLayers() 
	{ //v6.0
		var i,p,v,obj,args=MM_showHideLayers.arguments;
		for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) 
		{ 
			v=args[i+2];
			if (obj.style) 
			{ 
				obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;
			}
			obj.visibility=v; 
		}
	}
	
	// This is to highlight the TD boxes when you rollover about or contact
	
	function pviiClassNew(obj, new_style) 
	{
	   obj.className=new_style;
	}
	
	// These next two functions is for the rollover of projects - second level
	// part of the nav. This allows the TD of projects to be highlighted.
	
	function hilite(name)
	{
		if(document.layers)
		{
			document.layers[name].clip.width=200;
			document.layers[name].document.bgColor="yellow";
		}
		else
		{
			var cell=document.getElementById("td"+name);
			cell.style.backgroundColor="#CAC73D";
		}
	}
	
	function clearhilite(name)
	{
		if(document.layers)
		{
			document.layers[name].document.bgColor="white";
		}
		else
		{
			var cell=document.getElementById("td"+name);
			cell.style.backgroundColor="#545318";
		}
  	}
