// JavaScript Document
var currentmission
var currentaboutTag = "1";
var selconstructNumber = "1";
var selSecondConstNumber = '1';
var selmedicalbutton = '1';
var selhospitalbutton = '1';
var currentselmainmedical = "medicalsoft";
var selscaffoldno = '1';
var selserviceval = '1';
var selrestaurantbutton = '1';
var selfoodno = 1;
var fooddivcount = 15;

var selmenuno = 1;
var menudivcount = 3;

var selbank = '1';
var selhfibank = '1';
var cursorX = 0;
var cursorY = 0;
var selshiptab = 1;
var selElementtab = 1;
var setGETtab = 1;
var selEmeApptab = 1;
var selTradetab = 1;
var selartno = 1;
var artdivcount = 7;
var selElementno = 1;
var Elementdivcount = 8;
var selproecttab = 1;
var selOngoingProNumber = '1';
var selproposedproNumber = '1';
var selmaterialtab = '1'; //this is for trading/building materials
var selArtExhibition = '1';

function mouseovertext(val)
{
	  
	 document.getElementById(val).style.fontSize = '12';
	 document.getElementById(val).style.fontWeight = 'bold';	
}
function mouseouttext(val)
{
	 document.getElementById(val).style.fontSize = '11';
	 document.getElementById(val).style.fontWeight = 'normal';
}
function missionview(val)
{
	if(currentmission == val)
	{
		noDisplay();
		currentmission = "nothing";
		
	}else
	{
	currentmission = val;
	var valname = "div" + val;	
	noDisplay();
	document.getElementById(valname).style.display="";	
	}
}
function mousedowntext(val)
{
	noSelect();
	document.getElementById(val).style.fontSize = '12';
	document.getElementById(val).style.fontWeight = 'bold';
	
}
function noDisplay()
{
	document.getElementById("divmission1").style.display="none";	
	document.getElementById("divmission2").style.display="none";	
	document.getElementById("divmission3").style.display="none";	
	document.getElementById("divmission4").style.display="none";	
}
function noSelect()
{
	for(var i = 1;i < 5;i++)
	{
		var valname = "mission" + i;
		mouseouttext(valname);
	}
	 
}
function mouseoverdivision(val)
{
	//formatalltabsexp();
	if(currentaboutTag != val)
	{
        var currentval ="divtab" + val;
    	document.getElementById(currentval).style.background =  "url('image/aboutus/button2.gif')";
	    document.getElementById(currentval).style.fontSize = '13';
	}
	
}
function formatalltabsexp()
{
	
	for(var i = 1;i < currentaboutTag;i++)
	{
		var currentval ="divtab" + i;
		document.getElementById(currentval).style.background =  "url('image/aboutus/button1.gif')";
	    document.getElementById(currentval).style.fontSize = '12';
	}
	var temp = parseInt(currentaboutTag) + 1;
	
	for(var i = temp;i < 11;i++)
	{
		var currentval ="divtab" + i;
		document.getElementById(currentval).style.background =  "url('image/aboutus/button1.gif')";
	    document.getElementById(currentval).style.fontSize = '12';
	}
	
	
}
function formatalltabs()
{
	
	for(var i = 1;i < 11;i++)
	{
		var currentval ="divtab" + i;
		document.getElementById(currentval).style.background =  "url('image/aboutus/button1.gif')";		
	    document.getElementById(currentval).style.fontSize = '12';
	}
	
	
}
function clickdivision(val)
{
	currentaboutTag = val;	
	//formatDivisionDivs();
	formatalltabs();
	var url = "subfile/aboutus/aboutusframe" + val + ".php";
	document.getElementById('aboutconstframe').src = url;
	/*var divname = "division" + val;
	document.getElementById(divname).style.display="";	*/
	var currentval ="divtab" + val;	
	document.getElementById(currentval).style.background =  "url('image/aboutus/button3.gif')";		
	
	
}
function formatDivisionDivs()
{
	for(var i = 1;i < 11;i++)
	{
		var divname = "division" + i;
		document.getElementById(divname).style.display="none";	
	}
}
function InitialAboutusPage()
{
	//formatDivisionDivs();
	formatalltabs();
	currentaboutTag = "1";	
	document.getElementById('divtab1').style.background =  "url('image/aboutus/button3.gif')";		
	//document.getElementById('division1').style.display="";	
	
	
}
function InitialConstructionPage()
{
	onDownSecondConst('1');
	//showConstDivision('1');
	//construction project initializaiton
	selproecttab = 1;
	ondownprojecttab(selproecttab);
	onclickprojecttab(selproecttab);
	
	onInitializeprojecttab();
	
}
function mouseoutdivision(val)
{
	//formatalltabsexp();
	if(currentaboutTag != val)
	{
        var currentval ="divtab" + val;
    	document.getElementById(currentval).style.background =  "url('image/aboutus/button1.gif')";
	    document.getElementById(currentval).style.fontSize = '13';
	}	
}
function changebackColorOnover(val)
{
	if(selconstructNumber != val)
	{
	var selval = "construction" + val;
	document.getElementById(selval).bgColor ="#696969";
	}
	
}
function restorebackColorOnout(val)
{
	
	if(selconstructNumber != val)
	{		
	   var selval = "construction" + val;
	   document.getElementById(selval).bgColor ="#353535";
	}
}
function showconstructiondiv(val)
{
	var url = "subfile/construction/completeProject" + val + ".php";	
	document.getElementById('completeframe').src = url;
	/* var selval = "constructdiv" + val;
	for(var i = 1;i < 27;i++)
	{
		var temp = "constructdiv" + i;
		document.getElementById(temp).style.display="none";	
	}	
	document.getElementById(selval).style.display=""; */	
}
function setbackcoloronDown(val)
{
	selconstructNumber = val;
	for(var i = 1;i < 27;i++)
	{
		var temp = "construction" + i;
		document.getElementById(temp).bgColor ="#353535";		
	}
	var selvalue = "construction" + val;
	document.getElementById(selvalue).bgColor ="#666666";		
}
function showConstDivision(val)
{
	var url = "subfile/construction/construction" + val + ".php";
	document.getElementById('constframe').src = url;	
}
function onOverSecondConst(val)
{
	if(val != selSecondConstNumber)
	{
	 var selectedtab = "divcontroltab" + val;	
	 document.getElementById(selectedtab).style.background =  "url('image/construction/button2.png')";		
	}
}
function onOutSecondConst(val)
{
	if(val != selSecondConstNumber)
	{
	  var selectedtab = "divcontroltab" + val;
	  document.getElementById(selectedtab).style.background =  "url('image/construction/button1.png')";	
	}
}
function onDownSecondConst(val)
{
	selSecondConstNumber = val;
	for(var i = 1;i < 10;i++)
	{
		var temp = "divcontroltab" + i;
		document.getElementById(temp).style.background =  "url('image/construction/button1.png') ";		
	}
	var selectedtab = "divcontroltab" + val;
	document.getElementById(selectedtab).style.background =  "url('image/construction/button3.png' ) no-repeat center";		
}
function onOverMedical(val)
{
	if(val != selmedicalbutton)
	{
	  var selbutton = "medicalbutton" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button3.gif) no-repeat center";
	}
	
}
function onOutMedical(val)
{
	if(val != selmedicalbutton)
	{
	  var selbutton = "medicalbutton" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button1.gif) no-repeat center";
	}
}
function onDownMedical(val)
{
	selmedicalbutton = val;
	for(var i = 1;i < 5;i++)
	{
		onOutMedical(i);
	}	
	var selbutton = "medicalbutton" + val;
	document.getElementById(selbutton).style.background ="url(image/medical/button2.gif) no-repeat center";
}
function InitialMedicalPage()
{
	    document.getElementById('hospitaldiv').style.display="none";	
		document.getElementById('medicalsoftdiv').style.display="";			
		selmedicalbutton = '1';
		onDownMedical(selmedicalbutton);
		onClickMedical(selmedicalbutton);
		document.getElementById('medicalsoft').bgColor ="#101010";
	    document.getElementById('medicalhospital').bgColor ="#101010";
	    document.getElementById('medicalsoft').bgColor ="#292929";
		
	    currentselmainmedical  = 'medicalsoft';
		onDownMainMedical(currentselmainmedical); 
	
}
function onClickMedical(val)
{
	var url = "subfile/medical/medicalsoft" + val + ".php";
	document.getElementById('medicalsoftframe').src = url;
	/*for(var i = 1;i < 5;i++)
	{
		var temp = "medicalsoft" + i;
		document.getElementById(temp).style.display="none";			 
	}
	var selectedMedicalsoft = "medicalsoft" + val;
	document.getElementById(selectedMedicalsoft).style.display="";		 */
	
}
function onOverHospital(val)
{
	if(val != selhospitalbutton)
	{
	  var selbutton = "hospitalbutton" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button3.gif) no-repeat center";
	}
}
function onOutHospital(val)
{
	if(val != selhospitalbutton)
	{
	  var selbutton = "hospitalbutton" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button1.gif) no-repeat center";
	}
}
function onDownHospital(val)
{
	selhospitalbutton = val;
	for(var i = 1;i < 6;i++)
	{
		onOutHospital(i);
	}	
	var selbutton = "hospitalbutton" + val;
	document.getElementById(selbutton).style.background ="url(image/medical/button2.gif) no-repeat center";
}
function onClickHospital(val)
{
	var url = "subfile/medical/medicalhospital" + val + ".php";
	document.getElementById('medicalhospitalframe').src = url;
/*	for(var i = 1;i < 6;i++)
	{
		var temp = "medicalhospital" + i;
		document.getElementById(temp).style.display="none";			 
	}
	var selectedMedicalsoft = "medicalhospital" + val;
	document.getElementById(selectedMedicalsoft).style.display="";		*/
}
function onOverMainMedical(val)
{
	if(val != currentselmainmedical)
	{
		document.getElementById(val).style.background ="url(image/medical/button4.gif) no-repeat bottom";
	}
}
function onOutMainMedical(val)
{
  if(val != currentselmainmedical)
	{
		document.getElementById(val).style.background ="url(image/medical/button6.gif) no-repeat bottom";
	}
}
function onDownMainMedical(val)
{
	currentselmainmedical = val;
	document.getElementById('medicalsoft').style.background ="url(image/medical/button6.gif) no-repeat bottom";
	document.getElementById('medicalhospital').style.background ="url(image/medical/button6.gif) no-repeat bottom";
	document.getElementById(val).style.background ="url(image/medical/button5.gif) no-repeat bottom";
	if(val == "medicalsoft")
	{
		document.getElementById('hospitaldiv').style.display="none";	
		document.getElementById('medicalsoftdiv').style.display="";			
		selmedicalbutton = '1';
		onDownMedical(selmedicalbutton);
		onClickMedical(selmedicalbutton);		
	}else
	{
		document.getElementById('hospitaldiv').style.display="";	
		document.getElementById('medicalsoftdiv').style.display="none";	
		selhospitalbutton = '1';
		onDownHospital(selhospitalbutton);
		onClickHospital(selhospitalbutton);	
	}
	
}
function onOverScaffold(val)
{  
	if(val != selscaffoldno)
	{
	  var selbutton = "scaffoldbutton" + val;
	  document.getElementById(selbutton).bgColor ="#444444";
	}
	
}
function onOutScaffold(val)
{
	if(val != selscaffoldno)
	{
	  var selbutton = "scaffoldbutton" + val;
	  document.getElementById(selbutton).bgColor ="#101010";
	}
}
function onDownScaffold(val)
{
	
	selscaffoldno = val;
	for(var i = 1;i < 4;i++)
	{
		onOutScaffold(i);
	}	
	var selbutton = "scaffoldbutton" + val;
	document.getElementById(selbutton).bgColor ="#292929";
}
function onClickScaffold(val)
{
	for(var i = 1;i < 4;i++)
	{
		var temp = "tradetabdiv" + i;
		document.getElementById(temp).style.display="none";			 
	}
	var selectedMedicalsoft = "tradetabdiv" + val;
	document.getElementById(selectedMedicalsoft).style.display="";	
}
function InitialTradingPage()
{
	selTradetab = 1;
	ondowntrade(selTradetab);
	onclicktrade(selTradetab);
	
}
function InitialServicePage()
{
	selserviceval = '1';
	onDownservice(selserviceval);	
	onClickservice(selserviceval);
	selbank = '1';
	onDownCCCLBank(selbank);
	onClickCCCLbank(selbank);
	selhfibank = '1';
	onDownHFIBank(selhfibank);
	onClickHFIBank(selhfibank);
}
function onOnverservice(val)
{
	if(val != selserviceval)
	{	 
	 var temp = "servicetab" + val;
	  document.getElementById(temp).style.background ="url(image/service/button2.gif) no-repeat bottom";
	}
}
function onOutservice(val)
{
	
	if(val != selserviceval)
	{
		var temp = "servicetab" + val;
	  document.getElementById(temp).style.background ="url(image/service/button1.gif) no-repeat bottom";
	}
}
function onDownservice(val)
{
	selserviceval = val;
	for(var i = 1;i < 3;i++)
	{
		var temp = "servicetab" + i;
	  document.getElementById(temp).style.background ="url(image/service/button1.gif) no-repeat bottom";
	}
	var temp = "servicetab" + val;
	document.getElementById(temp).style.background ="url(image/service/button3.gif) no-repeat bottom";
}
function initAllsubservices()
{
	//initialize of CCCL Bank divs
	selbank = 1;
	onDownCCCLBank(selbank);
	onClickCCCLbank(selbank);
	
	
	selhfibank = '1';
	onDownHFIBank(selhfibank);
	onClickHFIBank(selhfibank);
}
function onClickservice(val)
{
	initAllsubservices();
	for(var i = 1;i < 3;i++)
	{
		var temp = "servicediv" + i;
		document.getElementById(temp).style.display="none";			
	}
	    var temp = "servicediv" + val;
		document.getElementById(temp).style.display="";	
	
}
function onOverRestaurant(val)
{
	if(val != selrestaurantbutton)
	{
	  var selbutton = "restaurant" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button3.gif) no-repeat center";
	}
}
function onOutRestaurant(val)
{
	if(val != selrestaurantbutton)
	{
	  var selbutton = "restaurant" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button1.gif) no-repeat center";
	}
}
function onDownRestaurant(val)
{
	selrestaurantbutton = val;
	for(var i = 1;i < 6;i++)
	{
		onOutRestaurant(i);
	}	
	var selbutton = "restaurant" + val;
	document.getElementById(selbutton).style.background ="url(image/medical/button2.gif) no-repeat center";
}
function onClickRestaurant(val)
{
	var url = "subfile/entertain/restaurantframe" + val + ".php";
	document.getElementById('restaurantframe').src = url;
	
  /*	if(val == 4)
	{
		InitFoodgallery();
	}
	for(var i = 1;i < 6;i++)
	{
		var temp = "showrestaurantdiv" + i;
		document.getElementById(temp).style.display="none";			 
	}
	var selectedMedicalsoft = "showrestaurantdiv" + val;
	document.getElementById(selectedMedicalsoft).style.display="";	
	if(val == '3')
	{
		 selfoodno = 1;
		document.getElementById('fooddiv1').style.display="";	
		document.getElementById('fooddiv2').style.display="none";	
		
	} */
	   
}
function hideAllfoods()
{
	//hidden all food divs
	for(var i = 1;i <= fooddivcount;i++)
	{
		var seldiv = "fooddiv" + i;
		document.getElementById(seldiv).style.display="none";	
	}
}
function onClickNextFood()
{
	
	//hideAllfoods();
	selfoodno = selfoodno + 1;
	if(selfoodno > fooddivcount)
	{
		selfoodno = fooddivcount;
	}
	var url = "subfoodframe" + selfoodno + ".php";	
	document.getElementById('entfoodframe').src = url;
	
	/*var seldiv = "fooddiv" + selfoodno;
	document.getElementById(seldiv).style.display="";*/
	
}
function InitFoodgallery()
{
	for(var i = 2; i <= fooddivcount;i++)
	{
		var seldiv = "fooddiv" + selfoodno;
	    document.getElementById(seldiv).style.display="none";
	}
	  var seldiv = "fooddiv" + 1;
	    document.getElementById(seldiv).style.display="";
}
function onClickPrevFood()
{
	//hideAllfoods();
	selfoodno = selfoodno - 1;
	if(selfoodno < 1)
	{
		selfoodno = 1;
	}
	var url = "subfoodframe" + selfoodno + ".php";
	document.getElementById('entfoodframe').src = url;
	
  /*	var seldiv = "fooddiv" + selfoodno;
	document.getElementById(seldiv).style.display="";	*/
}




function onClickNextMenu()
{
	
	//hideAllfoods();
	selmenuno = selmenuno + 1;
	if(selmenuno > menudivcount)
	{
		selmenuno = menudivcount;
	}
	var url = "submenuframe" + selmenuno + ".php";	
	document.getElementById('entmenuframe').src = url;
	
	/*var seldiv = "fooddiv" + selfoodno;
	document.getElementById(seldiv).style.display="";*/
	
}

function onClickPrevMenu()
{
	//hideAllfoods();
	selmenuno = selmenuno - 1;
	if(selmenuno < 1)
	{
		selmenuno = 1;
	}
	var url = "submenuframe" + selmenuno + ".php";
	document.getElementById('entmenuframe').src = url;
	
  /*	var seldiv = "fooddiv" + selfoodno;
	document.getElementById(seldiv).style.display="";	*/
}






function onOverCCCLBank(val)
{
	if(val != selbank)
	{
	  var selbutton = "ccclbank" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button3.gif) no-repeat center";
	}
}
function onOverHFIBank(val)
{
	if(val != selhfibank)
	{
	  var selbutton = "HFIbank" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button3.gif) no-repeat center";
	}
}
function onOutCCCLBank(val)
{
	if(val != selbank)
	{
	  var selbutton = "ccclbank" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button1.gif) no-repeat center";
	}
}
function onOutHFIBank(val)
{
	if(val != selhfibank)
	{
	  var selbutton = "HFIbank" + val;
	  document.getElementById(selbutton).style.background ="url(image/medical/button1.gif) no-repeat center";
	}
}
function onDownCCCLBank(val)
{
	selbank = val;
	for(var i = 1;i < 8;i++)
	{
		onOutCCCLBank(i);
	}	
	var selbutton = "ccclbank" + val;
	document.getElementById(selbutton).style.background ="url(image/medical/button2.gif) no-repeat center";
}
function onDownHFIBank(val)
{
	selhfibank = val;
	for(var i = 1;i < 4;i++)
	{
		onOutHFIBank(i);
	}	
	var selbutton = "HFIbank" + val;
	document.getElementById(selbutton).style.background ="url(image/medical/button2.gif) no-repeat center";
}
function onClickCCCLbank(val)
{
	for(var i = 1;i < 8;i++)
	{
		var temp = "ccclbankdiv" + i;
		document.getElementById(temp).style.display="none";			 
	}
	var selectedMedicalsoft = "ccclbankdiv" + val;
	document.getElementById(selectedMedicalsoft).style.display="";		
}
function onClickHFIBank(val)
{
	for(var i = 1;i < 4;i++)
	{
		var temp = "HFIbankdiv" + i;
		document.getElementById(temp).style.display="none";			 
	}
	var selectedMedicalsoft = "HFIbankdiv" + val;
	document.getElementById(selectedMedicalsoft).style.display="";	
}
function showCreateDiv(val)
{	
   
  
	var url = "subfile/index/myindex" + val + ".php";
	document.getElementById('indexmyframe').src = url;
	
	document.getElementById('divmission').style.left=window.event.clientX + (document.documentElement.scrollLeft ?
   document.documentElement.scrollLeft :
   document.body.scrollLeft);
	document.getElementById('divmission').style.top=window.event.clientY + (document.documentElement.scrollTop ?
   document.documentElement.scrollTop :
   document.body.scrollTop);
	document.getElementById('divmission').style.display="";
}
function showCreateDiv1(val)
{	
    for(var i = 1;i < 5;i++)
	{
		var seldivtemp = "divmission" + i;
		document.getElementById(seldivtemp).style.display="none";
		
	}
  
	var seldiv = "divmission" + val;
	
	document.getElementById(seldiv).style.left=window.event.clientX + (document.documentElement.scrollLeft ?
   document.documentElement.scrollLeft :
   document.body.scrollLeft);
	document.getElementById(seldiv).style.top=window.event.clientY + (document.documentElement.scrollTop ?
   document.documentElement.scrollTop :
   document.body.scrollTop);
	document.getElementById(seldiv).style.display="";
}
function exitdiv(val)
{
	var seldiv = "divmission" + val;
	document.getElementById(seldiv).style.display="none";
}
function onOverexitbuttoncolor(val)
{
	var seldiv = "divmission" + val;
	document.getElementById(seldiv).style.display="none";
}
function redirecturl()
{
	 document.location.href = "technology.php";
}
function onovershiptab(val)
{
	for(var i = 1;i < 5;i++)
	{
		if(i != selshiptab)
		{
			var temp = "shiptab" + i;
			if(i == val)
			{
			document.getElementById(temp).style.background ="url(image/ship/button2.gif) no-repeat bottom";
			} else
			{
				document.getElementById(temp).style.background ="url(image/ship/button1.gif) no-repeat bottom";
			}
		}
	}
}
function ondownshiptab(val)
{
	for(var i = 1;i < 5;i++)
	{
		var temp = "shiptab" + i;
		document.getElementById(temp).style.background ="url(image/ship/button1.gif) no-repeat bottom";
	}
	var temp = "shiptab" + val;
	document.getElementById(temp).style.background ="url(image/ship/button3.gif) no-repeat bottom";
	selshiptab = val;
	
}
function InitialShipPage()
{
	selshiptab = 1;
	document.getElementById('shiptab1').style.background ="url(image/ship/button3.gif) no-repeat bottom";
}
function onclickshiptab(val)
{
	for(var i = 1; i< 5;i++)
	{
		var seldivtemp = "shiptabdiv" + i;
		document.getElementById(seldivtemp).style.display="none";
	}
	var seldivtemp = "shiptabdiv" + val;
		document.getElementById(seldivtemp).style.display="";
}
function formatalltrade()
{	
	
	for(var i = 1;i < 8;i++)
	{
		if(i != selTradetab)
		{
		var currentval ="tradetab" + i;
		document.getElementById(currentval).style.background =  "url('image/trading/button1.jpg')";
	    document.getElementById(currentval).style.fontSize = '12';
		}
	}
	
}
function onovertrade(val)
{
	formatalltrade();
	if(selTradetab != val)
	{
        var currentval ="tradetab" + val;
    	document.getElementById(currentval).style.background =  "url('image/trading/button2.jpg')";
	    document.getElementById(currentval).style.fontSize = '13';
	}
	
}
function onouttrade(val)
{
	formatalltrade();
	if(selTradetab != val)
	{
        var currentval ="tradetab" + val;
    	document.getElementById(currentval).style.background =  "url('image/trading/button1.jpg')";
	    document.getElementById(currentval).style.fontSize = '13';
	}
	
}
function ondowntrade(val)
{
	selTradetab = val;
	formatalltrade();
	
	var currentval ="tradetab" + val;
    document.getElementById(currentval).style.background =  "url('image/trading/button3.jpg')";
	document.getElementById(currentval).style.fontSize = '12';
	
	
}
function onclicktrade(val)
{
	var url = "subfile/trading/tradingframe" + val + ".php";
	document.getElementById('tradingframe').src = url;
	/*for(var i = 1;i < 8;i++)
	{
		var temp = "tradetabdiv" + i;
		document.getElementById(temp).style.display="none";			
	}
	var temp = "tradetabdiv" + val;
		document.getElementById(temp).style.display="";	
		
		ondownmaterial('1');
		onclickmaterial('1'); */
}
function onoverprojecttab(val)
{
	if(val != selproecttab)
	{	 
	 var temp = "constprotab" + val;
	  document.getElementById(temp).style.background ="url(image/construction/button2.gif) no-repeat bottom";
	}
}
function onoutprojecttab(val)
{
	if(val != selproecttab)
	{
		var temp = "constprotab" + val;
	  document.getElementById(temp).style.background ="url(image/construction/button1.gif) no-repeat bottom";
	}
}
function ondownprojecttab(val)
{
	selproecttab = val;
	for(var i = 1;i < 4;i++)
	{
		var temp = "constprotab" + i;
	  document.getElementById(temp).style.background ="url(image/construction/button1.gif) no-repeat bottom";
	}
	var temp = "constprotab" + val;
	document.getElementById(temp).style.background ="url(image/construction/button3.gif) no-repeat bottom";
}
function onclickprojecttab(val)
{
	onInitializeprojecttab();
	for(var i = 1;i < 4;i++)
	{
		var temp = "constprojectdiv" + i;
		document.getElementById(temp).style.display="none";			
	}
	    var temp = "constprojectdiv" + val;
		document.getElementById(temp).style.display="";	
}
function onoverongoingprojecttab(val)
{
	
	
	if(selOngoingProNumber != val)
	{
	var selval = "ongoingprotab" + val;
	document.getElementById(selval).bgColor ="#696969";
	}
	
}
function onoutongoingprojecttab(val)
{
	if(selOngoingProNumber != val)
	{		
	   var selval = "ongoingprotab" + val;
	   document.getElementById(selval).bgColor ="#353535";
	}
}
function ondownongoingprojecttab(val)
{
	selOngoingProNumber = val;
	for(var i = 1;i < 8;i++)
	{
		var temp = "ongoingprotab" + i;
		document.getElementById(temp).bgColor ="#353535";		
	}
	var selvalue = "ongoingprotab" + val;
	document.getElementById(selvalue).bgColor ="#666666";	
}
function onclickgoingpro(val)
{
	var url = "subfile/construction/ongoingProject" + val + ".php";
	document.getElementById('ongoingframe').src = url;
}
function onoverproposedpro(val)
{
	if(selproposedproNumber != val)
	{
	var selval = "proposedpro" + val;
	document.getElementById(selval).bgColor ="#696969";
	}
}
function onoutproposedpro(val)
{
	if(selproposedproNumber != val)
	{		
	   var selval = "proposedpro" + val;
	   document.getElementById(selval).bgColor ="#353535";
	}
}
function ondownproposedpro(val)
{
	selproposedproNumber = val;
	for(var i = 1;i < 23;i++)
	{
		var temp = "proposedpro" + i;
		document.getElementById(temp).bgColor ="#353535";		
	}
	
	var selvalue = "proposedpro" + val;
	document.getElementById(selvalue).bgColor ="#666666";	
}
function onclickproposedpro(val)
{
	var url = "subfile/construction/proposeProject" + val + ".php";
	document.getElementById('proposeframe').src = url;
}
function onInitializeprojecttab()
{	 
    
	 setbackcoloronDown('1');
	 showconstructiondiv('1');	 
	
	 ondownongoingprojecttab('1');
	 onclickgoingpro('1');
	 
	 ondownproposedpro('1');
	 onclickproposedpro('1');
	 
}
function onovermaterial(val)
{
	if(val != selmaterialtab)
	{
	var temp = "buildmaterial" + val;
	document.getElementById(temp).style.background ="#404040";
	}
}
function onoutmaterial(val)
{
	if(val != selmaterialtab)
	{
	var temp = "buildmaterial" + val;
	document.getElementById(temp).style.background ="#202020";
	}
}
function onclickmaterial(val)
{
	
	var url = "buildmaterial" + val + ".php";
	document.getElementById('buildmaterialframe').src = url;
	/*for(var i = 1;i < 21;i++)
	{
		var temp = "buildmaterialdiv" + i;
	   document.getElementById(temp).style.display="none";	
	}
	var temp = "buildmaterialdiv" + val;
	document.getElementById(temp).style.display="";	 */
}

function ondownmaterial(val)
{
	selmaterialtab = val;
	for(var i = 1;i < 21;i++)
	{
		var temp = "buildmaterial" + i;
	   document.getElementById(temp).style.background ="#202020";
	}
	var temp = "buildmaterial" + val;
	document.getElementById(temp).style.background ="#666666";
}
// Initialize
function InitialEntertainmentPage()
{
	
	selEntertainmentVal = '1';
	onDownEntertainment(selEntertainmentVal);	
	onClickEntertainment(selEntertainmentVal);
	
	
	selRetaurantSection = '1';
	onDownResraurant(selRetaurantSection);
//	onClickRestaurant(selRetaurantSection);
	
	selArtExhibition = '1';
	onDownArtExhibition(selArtExhibition);
//	onClickArtExhibition(selArtExhibition);
}


function onClickEntertainment(val)
{
	initAllSubEntertainment();
	for(var i = 1;i < 3;i++)
	{
		var temp = "entertainmentdiv" + i;
		document.getElementById(temp).style.display="none";			
	}
	    var temp = "entertainmentdiv" + val;
		document.getElementById(temp).style.display="";	
}

function onOverEntertainment(val)
{
	if(val != selEntertainmentVal)
	{	 
 		var temp = "entertainmenttab" + val;
		document.getElementById(temp).style.background ="url(image/entertainment/button2.gif) no-repeat bottom";
	}
}
function onOutEntertainment(val)
{
	
	if(val != selEntertainmentVal)
	{
		var temp = "entertainmenttab" + val;
	  document.getElementById(temp).style.background ="url(image/entertainment/button1.gif) no-repeat bottom";
	}
}

function onDownEntertainment(val)
{
	selEntertainmentVal = val;
	for(var i = 1;i < 3;i++)
	{
		var temp = "entertainmenttab" + i;
	  document.getElementById(temp).style.background ="url(image/entertainment/button1.gif) no-repeat bottom";
	}
	var temp = "entertainmenttab" + val;
	document.getElementById(temp).style.background ="url(image/entertainment/button3.gif) no-repeat bottom";
}



function initAllSubEntertainment()
{
	selrestaurantbutton = '1';
	onDownRestaurant(selrestaurantbutton);
    onClickRestaurant(selrestaurantbutton);
	
	selArtExhibition = '1';
	onDownArtExhibition(selArtExhibition);
	onClickArtExhibition(selArtExhibition);
}


function onOverArtExhibition(val)
{
	
	if(val != selArtExhibition)
	{
	  var selbutton = "artexhibition" + val;
	  document.getElementById(selbutton).style.background ="url(image/entertainment/button3.jpg) no-repeat center";
	}
}


function onOutArtExhibition(val)
{
	if(val != selArtExhibition)
	{
	  var selbutton = "artexhibition" + val;
	  document.getElementById(selbutton).style.background ="url(image/entertainment/button1.jpg) no-repeat center";
	}
}

function onDownArtExhibition(val)
{
	selArtExhibition = val;
	for(var i = 1;i < 3;i++)
	{
		onOutArtExhibition(i);
	}	
	
	var selbutton = "artexhibition" + val;
	document.getElementById(selbutton).style.background ="url(image/entertainment/button2.jpg) no-repeat center";
}

function onClickArtExhibition(val)
{
	/*if(val == 2)
	{
		InitArtgallery();
	} */
	/*for(var i = 1;i < 3;i++)
	{
		var temp = "showartexhibitiondiv" + i;
		document.getElementById(temp).style.display="none";	 	 
	}*/	
	//var selectedMedicalsoft = "showartexhibitiondiv" + val;
	//document.getElementById(selectedMedicalsoft).style.display="";	
	document.getElementById("contacts").style.display="none";	
	if(val == '2')
	{
		 selartno = 1;
		//document.getElementById('artdiv1').style.display="";	
		//document.getElementById('artdiv2').style.display="none";	
		document.getElementById("contacts").style.display="";	
		
	} 
	var url = "subfile/entertain/artexhibition" + val + ".php";
	
	document.getElementById('artexhibitionframe').src = url;
	   
}
function hideAllarts()
{
	//hidden all art divs
	for(var i = 1;i <= artdivcount;i++)
	{
		var seldiv = "artdiv" + i;
		document.getElementById(seldiv).style.display="none";	
	}
}
function onClickNext()
{
	
//	hideAllarts();
	selartno = selartno + 1;
	if(selartno > artdivcount)
	{
		selartno = artdivcount;
	}
	var url = "subartframe" + selartno + ".php";
	document.getElementById('subartframe').src = url;
/*	var seldiv = "artdiv" + selartno;
	document.getElementById(seldiv).style.display=""; */
	
}
function InitArtgallery()
{
	for(var i = 2; i <= artdivcount;i++)
	{
		var seldiv = "artdiv" + selartno;
	    document.getElementById(seldiv).style.display="none";
	}
	  var seldiv = "artdiv" + 1;
	    document.getElementById(seldiv).style.display="";
}
function onClickPrev()
{
//	hideAllarts();
	selartno = selartno - 1;
	if(selartno < 1)
	{
		selartno = 1;
	}
	var url = "subartframe" + selartno + ".php";
	document.getElementById('subartframe').src = url;
	
/*	var seldiv = "artdiv" + selartno;
	document.getElementById(seldiv).style.display="";	*/
}



// Here is tyechnology section

// Initialize

var selTechnologyVal = '1';


function onClickTechnology(val)
{
	for(var i = 1;i < 4;i++)
	{
		var temp = "techdiv" + i;
		document.getElementById(temp).style.display="none";			
	}
	var temp = "techdiv" + val;
	document.getElementById(temp).style.display="";	
}

function onOverTechnology(val)
{
	if(val != selTechnologyVal)
	{	 
 		var temp = "techtab" + val;
		document.getElementById(temp).style.background ="url(image/tech/button2.gif) no-repeat bottom";
	}
}

function onOutTechnology(val)
{
	if(val != selTechnologyVal)
	{
		var temp = "techtab" + val;
	  document.getElementById(temp).style.background ="url(image/tech/button1.gif) no-repeat bottom";
	}
}

function onDownTechnology(val)
{
	selTechnologyVal = val;
	for(var i = 1;i < 4;i++)
	{
		var temp = "techtab" + i;
	  document.getElementById(temp).style.background ="url(image/tech/button1.gif) no-repeat bottom";
	}
	var temp = "techtab" + val;
	document.getElementById(temp).style.background ="url(image/tech/button3.gif) no-repeat bottom";
}
function InitialTechnologyPage()
{
	onDownTechnology('1');
	onClickTechnology('1');
}

// From here starts the codes for element flash page

function formatallelementtabs()
{
	for(var i = 1;i < 4;i++)
	{
		var currentval ="elementtab" + i;
		document.getElementById(currentval).style.background =  "url('image/element/button1.gif')";		
	    document.getElementById(currentval).style.fontSize = '12';
	}
}

function onClickElement(val)
{
	selElementtab=val;
	
	//formatallelementtabs();
	
	var url = "subfile/elementflash/elementframe"+val+".php";
	document.getElementById('elementframe').src = url;
	
	var currentval ="elementtab" + val;	
	document.getElementById(currentval).style.background =  "url('image/element/button3.gif')";	
	
	
}

function formatallelementapptabs()
{
	
	for(var i = 1;i < 4;i++)
	{
		var currentval ="elementAppbtn" + i;
		document.getElementById(currentval).style.background =  "url('image/element/button1.jpg')";		
	    document.getElementById(currentval).style.fontSize = '12';
	}
}

function onClickElementApp(val)
{
	selEmeApptab=val;
	
	///formatallelementapptabs();

	var url = "elementappframe" + val + ".php";
	
	document.getElementById('elementappframe').src = url;

//	var currentval ="elementAppbtn" + val;	
//	document.getElementById(currentval).style.background =  "url('../../image/element/button3.jpg')";		
	
}

function onOverElement(val)
{
	if(val != selElementtab)
	{	 
	 var temp = "elementtab" + val;
	  document.getElementById(temp).style.background ="url(image/element/button2.gif) no-repeat bottom";
	}
}
function onOutElement(val)
{
	if(val != selElementtab)
	{
		var temp = "elementtab" + val;
	  document.getElementById(temp).style.background ="url(image/element/button1.gif) no-repeat bottom";
	}
}
function onDownElement(val)
{
	selElementtab = val;
	for(var i = 1;i < 4;i++)
	{
		var temp = "elementtab" + i;
	  document.getElementById(temp).style.background ="url(image/element/button1.gif) no-repeat bottom";
	}
	var temp = "elementtab" + val;
	document.getElementById(temp).style.background ="url(image/element/button3.gif) no-repeat bottom";
}
function onOverEleApp(val)
{
	if(val != selEmeApptab)
	{
	  var selbutton = "elementAppbtn" + val;
	  document.getElementById(selbutton).style.background ="url(../../image/element/button3.jpg) no-repeat center";
	}
}
function onOutEleApp(val)
{
	
	if(val != selEmeApptab)
	{
	  var selbutton = "elementAppbtn" + val;
	  document.getElementById(selbutton).style.background ="url(../../image/element/button1.jpg) no-repeat center";
	}
}
function onDownEleApp(val)
{
	
	selEmeApptab = val;
	for(var i = 1;i < 4;i++)
	{		
		onOutEleApp(i);
	}	
	var selbutton = "elementAppbtn" + val;
	document.getElementById(selbutton).style.background ="url(../../image/element/button2.jpg) no-repeat center";
}

function InitElementApp()
{
	selEmeApptab = 1;
	onDownEleApp(selEmeApptab);
	onClickElementApp(selEmeApptab);
}
function InitialElementPage()
{
	selElementtab = 1;
	onDownElement(selElementtab);
	onClickElement(selElementtab);
}

function onClickElementPrev()
{
	hideAllElements();
	selElementno = selElementno - 1;
	if(selElementno < 1)
	{
		selElementno = 1;
	}
	
	var url = "elementappframe1" + selElementno + ".php";
	document.getElementById('elementappframe1').src = url;

	var seltitlediv = "elem_app_title" + selElementno;
	document.getElementById(seltitlediv).style.display="";	
}

function onClickElementNext()
{
	hideAllElements();
	selElementno = selElementno + 1;
	if(selElementno > Elementdivcount)
	{
		selElementno = Elementdivcount;
	}
	
	var url = "elementappframe1" + selElementno + ".php";
	document.getElementById('elementappframe1').src = url;

	var seltitlediv = "elem_app_title" + selElementno;
	document.getElementById(seltitlediv).style.display="";	
}

function hideAllElements()
{
	//hidden all element divs
	for(var i = 1;i <= Elementdivcount;i++)
	{
		var seltitlediv = "elem_app_title" + i;
		document.getElementById(seltitlediv).style.display="none";
	}
}

function onOverGETtab(val)
{
	if(val != setGETtab)
	{	 
	 var temp = "gettab" + val;
	  document.getElementById(temp).style.background ="url(image/get/general/button2.gif) no-repeat bottom";
	}
}
function onOutGETtab(val)
{
	if(val != setGETtab)
	{
		var temp = "gettab" + val;
	  document.getElementById(temp).style.background ="url(image/get/general/button1.gif) no-repeat bottom";
	}
}

function onDownGETtab(val)
{
	setGETtab = val;
	for(var i = 1;i < 4;i++)
	{
		var temp = "gettab" + i;
	  document.getElementById(temp).style.background ="url(image/get/general/button1.gif) no-repeat bottom";
	}
	var temp = "gettab" + val;
	document.getElementById(temp).style.background ="url(image/get/general/button3.gif) no-repeat bottom";
}


function onClickGETtab(val)
{
//	InitElementApp();
	
	var url = "subfile/get/getframe" + val + ".php";
	document.getElementById('getframe').src = url;
}
function InitialGETPage()
{
	setGETtab = 1;
	onDownGETtab(setGETtab);
	onClickGETtab(setGETtab);
}
var selGettechtab = 1;

function onOverGETtech(val)
{
	if(val != selGettechtab)
	{
	  var selbutton = "gettech" + val;
	  document.getElementById(selbutton).style.background ="url(../../image/element/button3.jpg) no-repeat center";
	}
}
function onOutGETtech(val)
{
	if(val != selGettechtab)
	{
	  var selbutton = "gettech" + val;
	  document.getElementById(selbutton).style.background ="url(../../image/element/button1.jpg) no-repeat center";
	}
}
function onDownGETtech(val)
{
	selGettechtab = val;
	for(var i = 1;i < 4;i++)
	{
		onOutGETtech(i);
	}	
	var selbutton = "gettech" + val;
	document.getElementById(selbutton).style.background ="url(../../image/element/button2.jpg) no-repeat center";
}

function InitGETtech()
{
	selGettechtab = 1;
	onDownGETtech(selGettechtab);
	onClickGETtech(selGettechtab);
}
function onClickGETtech(val)
{
	selGettechtab=val;
	
	///formatallelementapptabs();

	var url = "getframe2" + val + ".php";
	
	document.getElementById('gettecframe').src = url;

//	var currentval ="elementAppbtn" + val;	
//	document.getElementById(currentval).style.background =  "url('../../image/element/button3.jpg')";		
	
}

function change_parent_url(url)
{
	document.location=url;
}
