var i=0;
var title=new Array;
title[0]="حول خدماتنا";
title[1]="start";
title[2]="ماهي الخدمة";
title[3]="تساؤلات و إجابات";
title[4]="تعرف على خدمتنا";
title[5]="عقد الخدمة";
title[6]="سياسة النشر";
title[7]="بيانات صحفية";
title[8]="في وسائل الإعلام";
title[9]="end";
title[10]="خدمات أخرى";
title[11]="start";
title[12]="النشر التبادلي";
title[13]="محركات البحث";
title[14]="النشرات الدورية";
title[15]="الخدمة الجوالة";
title[16]="end";
title[17]="مواقع متميزة";
title[18]="اتصلوا بنا";
title[19]="خريطة الموقع";

var link=new Array;
link[0]="aboutus.htm";
link[1]="";
link[2]="aboutus/whats-publisharabia.htm";
link[3]="aboutus/questions-answers.htm";
link[4]="demo.htm";
link[5]="aboutus/contract.htm";
link[6]="aboutus/policy.htm";
link[7]="aboutus/Press-releases.htm";
link[8]="aboutus/Media.htm";
link[9]="";
link[10]="other-services.htm";
link[11]="";
link[12]="other-services/syndication.htm";
link[13]="other-services/search.htm";
link[14]="other-services/newsletters.htm";
link[15]="other-services/wap.htm";
link[16]="";
link[17]="specail-sites.htm";
link[18]="contact-us.htm";
link[19]="site-map.htm";


function path()
{
  return('/');
}

function bodyHTML()
{
  var html = "<img border=0 src="+path()+"images/spacer.gif width=170 height=20><br>";
  html += "<table border=0 width=160 cellspacing=0 cellpadding=0 class='menu'>";
  html +="<tr><td colspan=2 background=images/bg-2.gif><img src="+path()+"images/spacer.gif width=160 height=1></td></tr>";
  for (var i=0; i<title.length; i++)
    {
      if (title[i+1]=="start")
      { 
        html +="<tr><td class='TDMW' width=140>"+unescape(title[i])+"</td><td class='TDMW' width=20><img src="+path()+"images/main.gif></td></tr>";
        i+=2;
        while (title[i]!="end")
        { 
		html +="<tr><td colspan=2 background="+path()+"images/bg-2.gif><img src="+path()+"images/spacer.gif width=160 height=1></td></tr>";
		if (id != link[i])
          {
            html +="<tr>";
            html +="<td class='TDS' dir=rtl>";
            if (link[i] == "demo.htm")
				html += "<a class='TDS' href=\"#\" onclick=\"javaScript:window.open('/demo.htm','','width=600,height=490,scrollbars=auto')\">";
			else
html += "<a class='TDS' href="+path()+link[i]+">"
            html += unescape(title[i])+"</a></td><td class='TDS'><img src="+path()+"images/sub-section-off.gif></td>";
            html +="</tr>";        
          }
          else
				
          {
			if ( level == 1 )
			{
		        html +="<tr>";
				html +="<td class='TDON'>"+unescape(title[i])+"</td><td class='TDON'><img src="+path()+"images/sub-section-on.gif></td>";
				html +="</tr>";  
				document.all.pagedist.innerText = unescape(title[i]);
			}
			else
			{
				html +="<tr><td class='TDON'>";
				html +="<a class='TDON' href="+path()+link[i]+">"+unescape(title[i])+"</a><td class='TDON'><img src="+path()+"images/sub-section-on.gif></td>";
				html +="</td></tr>";  
				document.all.pagedist.innerText = unescape(title[i]);
			}
          }
          i++;
        }
        html +="<tr><td colspan=2 bgcolor='#090960'><img src="+path()+"images/spacer.gif width=1 height=1></td></tr>";
        html +="<tr><td><img border=0 src="+path()+"images/spacer.gif width=1 height=20><br></td></tr>";
      }
      else
      { if (id!=link[i])
        {
          html +="<tr><td class='TDM'>";
          html +="<a class='TDM' href="+path()+link[i]+">"+unescape(title[i])+"</a></td><td class='TDM'><img src="+path()+"images/main2.gif>";
          html +="</td></tr>";
        }
        else
        {
			if ( level == 1 )
			{
				html +="<tr>";
				html +="<td class='TDON'>"+unescape(title[i])+"</td><td class='TDON'><img src="+path()+"images/main-open.gif></td>";
				html +="</tr>";
			}
			else
			{
				html +="<tr><td class='TDON'>";
				html +="<a class='TDON' href="+path()+link[i]+">"+unescape(title[i])+"</a><td class='TDON'><img src="+path()+"images/main-open.gif></td>";
				html +="</td></tr>";
			}
        }
       }
      html +="<tr><td colspan=2 bgcolor='#090960'><img src="+path()+"images/spacer.gif width=160 height=1></td></tr>";
    }
    html +="<tr><td colspan=2><img src="+path()+"images/spacer.gif width=160 height=20></td></tr>";
document.all.main.innerHTML = html;
}


function change_image(id,on)
{
 if (on==true)
  {
    document.all[id].src="images/main-open.gif"
  }
 else
  { 
    document.all[id].src="images/main2.gif"
  }
}

function change_image_sub(id,on)
{
 if (on==true)
  {
    document.all[id].src="images/sub-section-on.gif"
  }
 else
  { 
    document.all[id].src="images/sub-section-off.gif"
  }
}


function homePage()
{
	html = "<a href='"+path()+"index.htm'><img src='"+path()+"images/go-home.gif' width='126' height='20' border='0'></a>";
	document.all.homePage.innerHTML = html;

	
}

function all()

{  if (id!="0") 
	homePage();
	
	bodyHTML();
}

all();

function enter()
//enter the customer page by nickname

{
if (service.text4.value!="")
{
service.action="http://"+service.text4.value+".PublishArabia.com";
service.submit();
}
else
alert("اكتب اسم الدخول");
}
