/***********************************************
 @author:
 Taghreed Kittaneh
 Royal Scientific Society
***********************************************/

document.write('<style type="text/css">');
var extension;

if (window.ActiveXObject)
{
    extension = 'png';
    document.write('#mainMenu{width:175px;margin:2px 0px 0px 1px;margin-top:12px}');
    document.write('#mainMenu a{cursor: pointer;width:175px;padding:4px 0px 3px 7px;margin:0px;color:#673f1a;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;}');
    document.write('#mainMenu div a{width:175px;font-size:11px;font-wieght:bold;padding:1px 0px 1px 37px}');

    document.write('#mainMenu img{vertical-align: bottom; border-style:none}');
    document.write('#mainMenu a:hover{font-weight:bold;color:#DC7729}');
    document.write('.subMenu{width:175px;visibility:hidden;display:none}');
}
else//FireFox browser
{
    extension = 'png';
    
	document.write('#mainMenu{width:175px;margin:3px 0px 0px 2px;margin-top:12px}');
	document.write('#mainMenu a{float:left;cursor: pointer;width:175px;padding:5px 0px 3px 5px;margin:0px;color:#673f1a;font-family:Arial;font-size:12px;text-decoration:none;font-weight:bold;}');
	document.write('#mainMenu div a{float:left;width:175px;font-size:11px;font-wieght:bold;padding:2px 0px 2px 34px}');

	document.write('#mainMenu img{vertical-align: bottom; border-style:none}');
	document.write('#mainMenu a:hover{font-weight:bold;color:#DC7729}');
	document.write('.subMenu{width:175px;visibility:hidden;display:none}');

}

document.write('</style>');

/***********************************************
 Scrollable Menu Links
***********************************************/

//configure menu width (in px):
var menuwidth=175;
//configure menu height (in px):
var menuheight=370;

//specify menu content
var menucontents='';

var open_flag1 = false; //if submenu1 are opened
var open_flag2 = false; //if submenu2 are opened
var open_flag3 = false; //if submenu3 are opened



//filling the array with the content of menu
menucontents += ('<div id="mainMenu">');

menucontents += ('<a id="temp"  onclick=' + ';showmenu1("firstMenu")><img id="img1" class="imgStyle"  src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;JIEC</a></br>');


   menucontents += ('<div class="subMenu" id="firstMenu">');

	//menucontents += ('<p style="visibilty:hidden;display:none">firstMenu</p>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/corporate.html" target="Main">Corporate Profile</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/Welcome.html" target="Main">Welcome</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/Vision.html" target="Main">Vision,Mission,and<br> Objectives</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/chart.html" target="Main">Organizational Chart</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/plan.html" target="Main">Strategic Plan</a></br>');
	//menucontents += ('<a href="/JIEC/JSP/Public/AnnualRep_e.html" target="Main">Annual Report</a></br>');
    menucontents += ('<a href="/JIEC/JSP_/other_files/report.html" target="Main">Annual Report</a></br>');
    menucontents += ('<a href="/JIEC/JSP_/other_files/innovationCenter.html" target="Main">Jordan Innovation Center</a></br>');

   menucontents += ('</div>');

//menucontents += ('<a href="overview.html" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.gif">&nbsp;&nbsp;Jordan Economic<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Overview</a></br>');

menucontents += ('<a onclick=' + ';showmenu2("secondMenu")><img id="img2" class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Investor Zone</a></br>');

menucontents += ('<div class="subMenu" name="secondMenu" id="secondMenu">');

	//menucontents += ('<p style="visibilty:hidden;display:none">secondMenu</p>');
    menucontents += ('<a href="/JIEC/JSP_/other_files/jiecLaw.html" target="Main" >JIEC Law</a></br>');
	//menucontents += ('<a href="jiecLaw.html" target="Main">JIEC Law</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/investments_Incentives.html" target="Main">Investment Incentives<br> and Exemptions</a></br>');
	//menucontents += ('<a href="/JIEC/JSP/Public/Product%26Services_introd.html" target="Main">Investment Services</a></br>');
    menucontents += ('<a href="/JIEC/JSP_/other_files/investment_services.html" target="Main">Investment Services</a></br>');
	menucontents += ('<a href="/JIEC/CommandControllerServlet?formAction=IndustrialCities&lang=0" target="Main">Available Land/Buildings</a></br>');
    menucontents += ('<a href="/JIEC/CommandControllerServlet?formAction=FindProduct&lang=0" target="Main">Investors Directory</a></br>');
    menucontents += ('<a href="/JIEC/JSP_/other_files/env_Brochures_e.jsp" target="Main">Environmental Brochures</a></br>');
	//menucontents += ('<a href="/JIEC/JSP_/Public/priceland_en.html" target="Main">Land/Building Prices</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/tenders.html" target="Main">Tenders and RFPs</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/FAQ.html" target="Main">FAQs</a></br>');

menucontents += ('</div>');


//menucontents += ('<a href="/JIEC/JSP_/other_files/Industrial_Estates.html" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Industrial Estates</a></br>');
menucontents += ('<a href="/JIEC/JSP_/other_files/Industrial_Estates.html" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Industrial Estates</a></br>');
menucontents += ('<a href="/JIEC/JSP_/other_files/Studies_Reports.html" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Studies and Plans</a></br>');
menucontents += ('<a href="/JIEC/JSP_/All/GISWelcomeENG.jsp" target="_blank"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;GIS</a></br>');
menucontents += ('<a href="/JIEC/CommandControllerServlet?formAction=showEventsNews&lang=0&homePage=no" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;News and Events</a></br>');
menucontents += ('<a href="/JIEC/JSP_/other_files/Testimonies.html" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Testimonies</a></br>');

menucontents += ('<a onclick=' + ';showmenu3("thirdMenu")><img id="img3" class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Photo Gallery</a></br>');
menucontents += ('<div class="subMenu" name="thirdMenu" id="thirdMenu">');

    menucontents += ('<a href="/JIEC/JSP_/other_files/Photo_Gallery.jsp?flash=2" target="Main">Industries</a></br>');
	menucontents += ('<a href="/JIEC/JSP_/other_files/Photo_Gallery.jsp?flash=1" target="Main">Industrial Estates</a></br>');
	
menucontents += ('</div>');

menucontents += ('<a href="/JIEC/JSP_/other_files/useful_links.html" target="Main"><img class="imgStyle" src="/JIEC/resources/images/bullet-1.'+extension+'">&nbsp;&nbsp;Useful Links </a></br>');

menucontents += ('</div>');





var iedom=document.all||document.getElementById




var actualHeight=''
var cross_scroll, ns_scroll
var loadedyes=0

function fillup()
{


	if (iedom)
	{

		cross_scroll=document.getElementById? document.getElementById("test2") : document.all.test2

		cross_scroll.innerHTML=menucontents
		actualHeight = 300;
		//actualHeight=document.all? cross_scroll.offsetHeight : document.getElementById("temp").offsetHeight

	}//end of if part

	else if (document.layers)
	{
		ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
		ns_scroll.document.write(menucontents)
		ns_scroll.document.close()
		actualHeight=ns_scroll.document.height

	}//end of else if

	loadedyes=1

}//end of function



window.onload=fillup


if (iedom||document.layers)
{

	with (document)
	{
		write('<table frame="void" id="table1" style="border-collapse:collapse" border="0" cellspacing="0" cellpadding="0">')
		write('<tr>');
		write('<td  width="'+menuwidth+'px" valign="top" halign="right">')

		if (iedom)
		{

			write('<div style="position:relative;width:'+menuwidth+'px;height:'+menuheight+'px;overflow:hidden;">')
			write('<div id="test2" style="position:absolute;left:0;top:0">')
			write('</div></div>')

		}//end of if

		else if (document.layers)
		{

			write('<ilayer width='+menuwidth+' height='+menuheight+' name="ns_scrollmenu">')
			write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')

		}//end of else if

		write('</td>');

		write('</tr>');

		write('</table>')

	}//end of with part
}



function showmenu1(elmnt)
{
	hidemenus();

	open_flag2 = false;
    open_flag3=false;
	//alert(elmnt);

	if(!open_flag1)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById(elmnt).style.display="block";

		document.getElementById('img1').src = "/JIEC/resources/images/bullet-2."+extension;
		open_flag1 = true;

	}
	else
	{
		//hideScrollers();
		document.getElementById(elmnt).style.visibility="hidden";
		document.getElementById(elmnt).style.display="none";
		document.getElementById('img1').src = "/JIEC/resources/images/bullet-1."+extension;
		open_flag1 = false;
	}

	//showAnimation();
}


function showmenu2(elmnt)
{

	hidemenus();
	open_flag1 = false;
    open_flag3 = false;

	if(!open_flag2)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById(elmnt).style.display="block";

		document.getElementById('img2').src = "/JIEC/resources/images/bullet-2."+extension;
		open_flag2 = true;
	}
	else
	{
		//hideScrollers();
		document.getElementById(elmnt).style.visibility="hidden";
		document.getElementById(elmnt).style.display="none";
		document.getElementById('img2').src = "/JIEC/resources/images/bullet-1."+extension;
		open_flag2 = false;
	}

}

function showmenu3(elmnt)
{

	hidemenus();
	open_flag1 = false;
    open_flag2 = false;

	if(!open_flag3)
	{
		document.getElementById(elmnt).style.visibility="visible";
		document.getElementById(elmnt).style.display="block";

		document.getElementById('img3').src = "/JIEC/resources/images/bullet-2."+extension;
		open_flag3 = true;
	}
	else
	{
		//hideScrollers();
		document.getElementById(elmnt).style.visibility="hidden";
		document.getElementById(elmnt).style.display="none";
		document.getElementById('img3').src = "/JIEC/resources/images/bullet-1."+extension;
		open_flag3 = false;
	}

}
function hidemenus()
{

	var x=document.getElementById('mainMenu').getElementsByTagName("div");

	document.getElementById('img1').src = "/JIEC/resources/images/bullet-1."+extension;
	document.getElementById('img2').src = "/JIEC/resources/images/bullet-1."+extension;
    document.getElementById('img3').src = "/JIEC/resources/images/bullet-1."+extension;

	for(i=0;i<x.length;i++)
	{
		x[i].style.visibility="hidden";
		x[i].style.display="none";


		/*var name = x[i].firstChild.firstChild.nodeValue);
		name.style.visibility="hidden";
		x[i].style.display="none";*/

	}//end of for loop
}








