if(id == null)
	var id = "";
	
if(level == null)
	var level = "";

var section = "";
var inSection = false;
var i=0;
var title = new Array;
title[0]="upper";
title[1]="image";
title[2]="السيد المرجع";
title[3]="start";
title[4]="منتخب المسائل الاسلامية";
title[5]="مناسك الحج";
title[6]="end";
title[7]="الامام الراحل";
title[8]="start";
title[9]="مائة مسئلة شرعية";
title[10]="منتخب المسائل الإسلامية";
title[11]="أجوبة المسائل اللبنانية";
title[12]="الإستفتاءات المرجعية";
title[13]="الفقه - المسائل المتجددة";
title[14]="المسائل المقدادية";
title[15]="end";
title[16]="lower";
title[17]="upper";
title[18]="النشرة الفقهية";
title[19]="lower";
title[20]="upper";
title[21]="الصفحة الرئيسية";
title[22]="المؤلفات";
title[23]="المكتبة الصوتية";
title[24]="السيرة الذاتية";
title[25]="رؤى وافكار";
title[26]="مجلة الكلمة الطيبة";
title[27]="ارتباطات";
title[28]="المكتبة المصورة";
title[29]="شبكة المستقبل";
title[30]="lower";
title[31]="image";
title[32]="upper";
title[33]="image";
title[34]="احداث واخبار";
title[35]="حول العالم";
title[36]="صحافة";
title[37]="اصدارات عالمية";
title[38]="lower";
title[39]="image";
title[40]="upper";
title[41]="image";
title[42]="البريد الألكتروني";
title[43]="الإشتراك";
title[44]="ادعو صديقك";
title[45]="ارسل بطاقة";
title[46]="بحث";
title[47]="سجل الزوار";
title[48]="لوحة المفاتيح العربية";
title[49]="Read Arabic";
title[50]="lower";
title[51]="image";
title[52]="upper";
title[53]="image";
title[54]="فارسى";
title[55]="English";
title[56]="أردو";
title[57]="lower";

var link = new Array;
link[0]="images/menu-upper_off.gif";
link[1]="images/titel_abwab.gif";
link[2]="javascript:sections('rflo_sadikshirazi')";
link[3]="rflo_sadikshirazi";
link[4]="rflo/s_shirazi/montakhab/fehres.htm";
link[5]="rflo/s_shirazi/manasik_haj/fehres.htm";
link[6]="";
link[7]="javascript:sections('rflo_imamshirazi')";
link[8]="rflo_imamshirazi";
link[9]="rflo/100masalehsharieh/fehres.htm";
link[10]="rflo/montakhab/fehres.htm";
link[11]="rflo/lobnanyeh/fehres.htm";
link[12]="rflo/alestiftaatalmarjeyeh/fehres.htm";
link[13]="rflo/m_motjadedah/fehres.htm";
link[14]="rflo/almegdayeah/fehres.htm";
link[15]="";
link[16]="images/menu-lower_off.gif";
link[17]="images/menu-upper_off.gif";
link[18]="/www.ajowbeh.com";
link[19]="images/menu-lower_off.gif";
link[20]="images/menu-upper_off.gif";
link[21]="index.htm";
link[22]="compilations/compilations.htm";
link[23]="lectures/lectures.htm";
link[24]="autobiography/autobiography.htm";
link[25]="roaa/roaa.htm";
link[26]="kalemaeh/kalemaeh.htm";
link[27]="links/links.htm";
link[28]="album/album.htm";
link[29]="/almostaqbal.com";
link[30]="images/menu-lower_off.gif";
link[31]="images/spacer.gif' width='6' height='6";
link[32]="images/menu-upper_off.gif";
link[33]="images/titel_ubb.gif";
link[34]="news/news.htm";
link[35]="world/news.htm";
link[36]="world/article.htm";
link[37]="world/book.htm";
link[38]="images/menu-lower_off.gif";
link[39]="images/spacer.gif' width='6' height='6";
link[40]="images/menu-upper_off.gif";
link[41]="images/titel_khadamat.gif";
link[42]="service/connection/connection.htm";
link[43]="service/maillist.htm";
link[44]="cgi-bin/birdcast/birdcast.cgi";
link[45]="service/postcards/cardcenter.html";
link[46]="service/g_serch.htm";
link[47]="cgi-bin/ugbcgi/ugb.cgi";
link[48]="service/Arabic Keyboard.htm";
link[49]="service/How to read Arabic.htm";
link[50]="images/menu-lower_off.gif";
link[51]="images/spacer.gif' width='6' height='6";
link[52]="images/menu-upper_off.gif";
link[53]="images/titel_language.gif";
link[54]="/alshirazi.org";
link[55]="/www.shirazi.org.uk";
link[56]="/www.almizan.com.pk";
link[57]="images/menu-lower_off.gif";

function UL(){
var upper,lower,page;
for (var i=0 ; i<title.length ; i++)
  	if (link[i] == id)
		page=i;
for (var i=0 ; i<page ; i++)
  	if (title[i] == "upper")
		upper=i;
for (var i=(title.length-1) ; i>page ; i--)
  	if (title[i] == "lower")
		lower=i;
link[upper]="images/menu-upper_on.gif";
link[lower]="images/menu-lower_on.gif";
}

/*function schedule(url)
{
	document.open(url,"","width=600; height=500; scrollbars=1; resizable=1" );
}*/

function bodyHtml(){
var html = "<table class='menu' width='110' cellspacing='0' cellpadding='0' valign='top'>";
for (var i=0; i<title.length; i++){
	html += "<tr>";
	if (( title[i] == "image")||(title[i] == "upper")||(title[i] == "lower")){
		html += "<td style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
		html += "<img src='"+link[i]+"'>";}
	else if (title[i+1] == "start"){
		html += "<td class='TDM' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
		html += "<a id="+link[i+1]+"H class='TDM' HREF="+link[i]+"><img id="+link[i+1]+"I src='images/menu-expand.gif' border=0 align=absMiddle>  ";
		html += unescape(title[i]);
		html += "</a>";}
	else if (id == link[i]){
		if (level==3)
		{
			html += "<td class='TDML' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
			html += "<a class='TDML'HREF='/"+link[i]+"'>";
			html += unescape(title[i]);
			html += "</a>";
		}
		else
		{
			html += "<td class='TDML' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
			html += "<p class='TDML'>"
			html += unescape(title[i]);
			html += "</p>";
		}
	}
	else if (link[i]== ""){
		html += "<td class='TDM' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
		html += "<a class='TDM' HREF=# onclick=\"javaScript:window.open('/"+link[i]+"','','width=432,height=450,scrollbars=yes')\">";
		html += unescape(title[i]);
		html += "</a>";}
	else if (link[i]=="")
		{
			html += "<td class='TDM' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
			html += "<a class='TDM' HREF='"+link[i]+"'>";
			html += unescape(title[i]);
			html += "</a>";
		}
	else {
		html += "<td class='TDM' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
		html += "<a class='TDM' HREF='/"+link[i]+"'>";
		html += unescape(title[i]);
		html += "</a>";}
		
	html += "</td>";
	html += "</tr>";
	if (title[i+1] == "start"){
		if (inSection == false)
		section = link[i+1];
		html += "<tr id="+link[i+1]+" class='hide'><td>";
		html += "<table border='0' width=100% cellspacing='0' cellpadding='0'>";
		i+=2;
		while (title[i] != "end"){
			html += "<tr>";
			if (id == link[i]){
				inSection = true;
				html += "<td class='TDSML' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
				if (level==3)
				{
					html += "<a class='TDSML' HREF='/"+link[i]+"'>";
					html += unescape(title[i]);
					html += "</a>";
				}
				else
				{
					html += "<p class='TDSML'>";
					html += unescape(title[i]);
					html += "</p>";
				}
				
				html += "</td>";}
			else{
				html += "<td class='TDSM' style='border-top-style: solid; border-top-width: 1' bordercolor='#985010'>";
				html += "<a class='TDSM' HREF='/"+link[i]+"'>";
				html += unescape(title[i]);
				html += "</a>";
				html += "</td>";
			}
			html += "</tr>";
			i++;}
		html += "</table></td></tr>";
	}
}
html += "</table>";
return html;
}

function sections(sectionName)
{
	sectionHeader = sectionName+"H";
	sectionImage = sectionName+"I";
	if (document.all[sectionName].className == "show")
	{
		document.all[sectionName].className = "hide";
		document.all[sectionHeader].className = "TDM";
		document.all[sectionImage].src='images/menu-expand.gif'
	}
	else
	{
		document.all[sectionName].className = "show";
		document.all[sectionHeader].className = "TDML";
		document.all[sectionImage].src='images/menu-expand-open.gif'
	}
}

function MenuHTML()
{
	var html="";

	if (id != "home")
	{
//		UL();
		html += "<MAP name=Map1><AREA href='/index.htm' shape=\"rect\" coords=\"0, 0, 0, 0\"></map>";
                html += "<img src='images/logo_02.jpg' usemap=\"#Map2\" border='0'>";
                html += "<img src='images/logo_01.jpg' usemap=\"#Map1\" border='0'>";
                html += "<img src='images/logo_04.jpg' usemap=\"#Map3\" border='0'>";
                html += "<img src='images/logo_03.jpg' usemap=\"#Map4\" border='0'>";
	}
        else
	{
		
	}
	//if (id == 'home')
	html += bodyHtml();
	html += "<br><img src='images/spacer.gif' width='8' height='20'>";
	return html ;
}

function all()
{
	var menuStr = MenuHTML() ;

	if(eval(document.all.menuArea))
		document.all.menuArea.innerHTML = menuStr ;

	if (inSection == true)
		sections(section);
}

function CheckIE()
{
	var ie4=0;ie5=0;
	if (document.all) {
		var MS=navigator.appVersion.indexOf("MSIE");
		window.isIE4 =(MS>0) && ((parseInt(navigator.appVersion.substring(MS+5,MS+6)) <= 4) && (navigator.appVersion.indexOf("MSIE"))>0);
		window.isIE5 =(MS>0) && ((parseInt(navigator.appVersion.substring(MS+5,MS+6)) > 4) && (navigator.appVersion.indexOf("MSIE"))>0);
		if (window.isIE4)
			return false;
		else if (window.isIE5)
			return true;
	}
}






all();