
//function for changing image colors - used in innercurrent template
function changeclr_current()
{			
	var strpage;
	strpage=window.location.href;
  	if((strpage.indexOf('fifteencentralparkwest')>0))
	{					
		document.getElementById('td4').innerHTML='&raquo;'
	}
}	//function for changing image colors

 //used in innerabout template
function changeclr_about()
{			
	var strpage;
	strpage=window.location.href;
	
	if((strpage.indexOf('valueeng')>0))
	{						
		document.getElementById('td1').innerHTML='&raquo;'
	}
	if((strpage.indexOf('trademanagement')>0))
	{						
		document.getElementById('td2').innerHTML='&raquo;'
	}
	
}	//function for changing image colors

/*function changeclr_corporate()
{
	var strpage;
	strpage=window.location.href;
	
 		if((strpage.indexOf('listofexe')>0))
		{				
			document.getElementById('td3').innerHTML='&raquo;'
		}
}*/
function changeclr_complete()
{
		var strpage;
		strpage=window.location.href;
		
		//for Users Section ManagementTeam ---For Completed section
	  if(strpage.indexOf('hospital')>0)
		{						
			document.getElementById('td5').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('hotels')>0)
		{						
			document.getElementById('td6').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('apartments')>0)
		{						
			document.getElementById('td7').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('commercial')>0)
		{						
			document.getElementById('td8').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('transport')>0)
		{						
			document.getElementById('td9').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('speciality')>0)
		{						
			document.getElementById('td11').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('education')>0)
		{						
			document.getElementById('td12').innerHTML='&raquo;'
		}
		else if(strpage.indexOf('courthouse')>0)
		{						
			document.getElementById('td13').innerHTML='&raquo;'
		}
	}	//function for changing image colors

	function chksub()
	{
		  if (document.form1.query.value=="") 
		  {
		   alert("Please enter the Search value")
		   form1.query.focus();
		   return false;
		  }
		  //else
		 // {
		  //	window.location.href="search.php?action=SEARCH&keyword="+ document.form1.keyword.value +"&limit=1000";
		 // }
	}
	
function changeclr_corporate(id)
	{
	var style 
	
	  	document.getElementById("img2").src="images/arrow.gif";
	   	document.getElementById("img3").src="images/arrow.gif";
	    document.getElementById("img4").src="images/arrow.gif";
		document.getElementById("img5").src="images/arrow.gif";
	    document.getElementById("img6").src="images/arrow.gif";
	    document.getElementById("img7").src="images/arrow.gif";
		document.getElementById("img8").src="images/arrow.gif";
		document.getElementById("img9").src="images/arrow.gif";
		 if(id==1)
			{
			 	window.open("http://finance.yahoo.com/q/ks?s=KSW")
    	 		window.location.href="listofexe.html"
 			 }
		 else if(id==2)
		 {
		 	 window.open("http://finance.yahoo.com/q/sec?s=KSW")
			 document.getElementById("img6").src="images/redicon.gif";
			 if (document.getElementById("sub6_767"))
			  {
				 document.getElementById("sub6_767").style.display="none";
			  }
			  else if (document.getElementById("sub6"))
			  {
			  	document.getElementById("sub6").style.display="none";
			  }
			  else if (document.getElementById("sub6_786"))
			  {
				 document.getElementById("sub6_786").style.display="none";
			  }
			  
	  		 
		 }
		  else if(id==3)
		 {
		 	 window.open("http://finance.yahoo.com/q/h?s=KSW")
			 document.getElementById("img7").src="images/redicon.gif";
			 if (document.getElementById("sub6_767"))
			  {
				 document.getElementById("sub6_767").style.display="none";
			  }
			  else if (document.getElementById("sub6"))
			  {
			  	document.getElementById("sub6").style.display="none";
			  }
			  else if (document.getElementById("sub6_786"))
			  {
				 document.getElementById("sub6_786").style.display="none";
			  }
		 }
		 
   	}
	function changeclr_sec()
	{
		
			 window.open("http://finance.yahoo.com/q/sec?s=KSW")
			 document.getElementById(img6).src=images/redicon.gif
   	}
	
function showhide(el, thisImg, state)
{
if (e = document.getElementById(el)) {
if (state == null) {
state = e.style.display == 'none';
e.style.display = (state ? '' : 'none');
}
//...except for this, probably a better way of doing this, but it works at any rate..., sets an image to act as the +/- idea from previous...
if (state == true){ 
document.getElementById(thisImg).src="images/redicon.gif";
}
if (state == false){
document.getElementById(thisImg).src="images/arrow.gif";
}
}
}


function change_ksw()
{
 		var strpage;
		strpage=window.location.href;
		/*document.getElementById("img2").src="images/arrow.gif";
	   	document.getElementById("img3").src="images/arrow.gif";
	    document.getElementById("img4").src="images/arrow.gif";
		document.getElementById("img5").src="images/arrow.gif";
	    document.getElementById("img6").src="images/arrow.gif";
	    document.getElementById("img7").src="images/arrow.gif";
		document.getElementById("img7").src="images/arrow.gif";
		document.getElementById("img9").src="images/arrow.gif";*/
        if(strpage.indexOf('contactus')>0)
		{
			document.getElementById('img8').setAttribute("src","images/redicon.gif");
			//showhide('sub6_768','img8');
		}
		
		if(strpage.indexOf('site')>0)
		{
			document.getElementById('img8').setAttribute("src","images/arrow.gif");
			//showhide('sub6_768','img8');
		}
		if(strpage.indexOf('search')>0)
		{
			document.getElementById('img8').setAttribute("src","images/arrow.gif");
			//showhide('sub6_768','img8');
		}
}	

function changeimg()
{
	var strpage;
	strpage=window.location.href;
	if(strpage.indexOf('index')>0)
	{
		document.getElementById('img8').setAttribute("src","images/redicon.gif");
	}
	if(strpage.indexOf('aboutksw')>0 || strpage.indexOf('valueeng')>0 || strpage.indexOf('trademanagement')>0)
	{
		document.getElementById('img1').setAttribute("src","images/redicon.gif");
	}
	if(strpage.indexOf('valueeng')>0)
	{
		document.getElementById('simg1').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('trademanagement')>0)
	{
		document.getElementById('simg2').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('listofexe')>0)
	{
		document.getElementById('img2').setAttribute("src","images/redicon.gif");
		document.getElementById('simg3').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('completedproj')>0 || strpage.indexOf('hospital')>0 || strpage.indexOf('hotels')>0 || strpage.indexOf('apartments')>0 || strpage.indexOf('commercial')>0 || strpage.indexOf('transport')>0 || strpage.indexOf('speciality')>0 || strpage.indexOf('education')>0 || strpage.indexOf('courthouse')>0 || strpage.indexOf('chillerplants')>0)
	{
		document.getElementById('img4').setAttribute("src","images/redicon.gif");
	}
	if(strpage.indexOf('hospital')>0)
	{
		document.getElementById('simg4').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('hotels')>0)
	{
		document.getElementById('simg5').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('apartments')>0)
	{
		document.getElementById('simg6').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('commercial')>0)
	{
		document.getElementById('simg7').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('transport')>0)
	{
		document.getElementById('simg8').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('speciality')>0)
	{
		document.getElementById('simg9').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('education')>0)
	{
		document.getElementById('simg10').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('courthouse')>0)
	{
		document.getElementById('simg11').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('chillerplants')>0)
	{
		document.getElementById('simg12').setAttribute("src","images/redarrow.gif");
	}
	if(strpage.indexOf('currentkswproject')>0 || strpage.indexOf('fifteencentralparkwest')>0 || strpage.indexOf('170eastendavenue')>0 || strpage.indexOf('325fifthavenue')>0 || strpage.indexOf('barclaytower')>0 || strpage.indexOf('onebrooklyn')>0 || strpage.indexOf('crestlofts')>0 || strpage.indexOf('cocoaexchange')>0 || strpage.indexOf('northsidepiers')>0 || strpage.indexOf('theharrison205')>0 || strpage.indexOf('thebromton206')>0 || strpage.indexOf('thecrest63wall')>0 || strpage.indexOf('thecrestlofts67wall')>0 || strpage.indexOf('10westendavenue')>0 || strpage.indexOf('thesetainewyork')>0 || strpage.indexOf('20exchangeplace')>0)
	{
		document.getElementById('img3').setAttribute("src","images/redicon.gif");
	}
	if(strpage.indexOf('trumpinternationalhotelandtower')>0 || strpage.indexOf('123washingtonstreet')>0 || strpage.indexOf('1330firstavenue')>0 || strpage.indexOf('weillcornell')>0 || strpage.indexOf('providencerestnursinghome')>0 || strpage.indexOf('45streethotel')>0 || strpage.indexOf('tribecagreen')>0 || strpage.indexOf('808columbusavenue')>0 )
	{
		document.getElementById('img3').setAttribute("src","images/redicon.gif");
	}
	if(strpage.indexOf('contactus')>0)
	{
		document.getElementById('img7').setAttribute("src","images/redicon.gif");
	}
}	