/*----------------------------------------------START SEARCH-----------------------------------*/
function chklength(idx)
{
	var myname=idx;
	
	myname=myname.replace(/^\s*(\b.*\b|)\s*$/, "$1");
	return myname.length;
}

function keytest()
{
if ((event.keyCode > 32 && event.keyCode < 48) || (event.keyCode > 57 && event.keyCode < 65) || (event.keyCode > 90 && event.keyCode < 97)) 
{
	event.returnValue = false;
}
}

function disallow()
{
if(document.searchformleft.SearchString.value.length<2 && window.event.keyCode==13)
{
	window.event.keyCode=0;
	alert("لا يسمح بالبحث بحرف واحد فقط");
}
}

function fn_add1()
{	
var errval=0;
var str=new String(document.searchformleft.SearchString.value);
for(i=0;i<str.length-1;i++)
{
	if(str.charCodeAt(i)>=33 && str.charCodeAt(i)<=47) 
	errval=1
	if(str.charCodeAt(i)>=58 && str.charCodeAt(i)<=60)
	errval=1;
	if(str.charCodeAt(i)>=62 && str.charCodeAt(i)<=64)
	errval=1;
	if(str.charCodeAt(i)>=91 && str.charCodeAt(i)<=95)
	errval=1;
	if(str.charCodeAt(i)==123 || str.charCodeAt(i)==125)
	errval=1;
}
    
if(chklength(document.searchformleft.SearchString.value)==0)
{
	alert("الرجاء إدخال كلمة البحث");
	document.searchformleft.SearchString.focus();
	return false;
}	
else if(chklength(document.searchformleft.SearchString.value)==1)
{
alert("لا يسمح بالبحث بحرف واحد فقط");
return false;
}

if(errval==1)
{
alert("لا يسمح بالبحث بالرموز");
return false;
}
else
return true;
}

function ViewImage(ifile,ix,iy,ititle) { 
var win;
var sWidth;
var sHeight;
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,left=100,top=60,toolbar=no,scrollbars=no");
 
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body topmargin=0 leftmargin=0>");
win.document.write("<table border=0 cellpadding=0 cellspacing=0 width=250 height=290><tr><td width=100% valign=top height=250>");
win.document.write("<img border=0 src="+ifile+"></td></tr></table>");
win.document.write("</body></html>");
win.document.close();
}
/*----------------------------------------------END SEARCH-----------------------------------*/

function Top()
{
var sTop = "";
sTop +="<table border=0 cellpadding=0 cellspacing=0 width=970 align=center><tr>";
sTop +="<td width=350><img border=0 src=/arabic/images/home/logo2.jpg></td>";
sTop +="<td width=620 class=NLC_topbg>";
sTop +="<table border=0 cellpadding=0 cellspacing=0 width=300><tr>";
/*sTop +="<td class=NLC_toplinks1><a href=/arabic/index.html class=NLC_toplinks2>الصفحة الرئيسية</a></td>";
sTop +="<td width=20 align=center><img border=0 src=/arabic/images/home/top_line1.gif></td>";*/
sTop +="<td class=NLC_toplinks1><a href=/arabic/cust_services/eservice_request.aspx class=NLC_toplinks2>خدمة العملاء</a></td>";
sTop +="<td width=20 align=center><img border=0 src=/arabic/images/home/top_line1.gif></td>";
sTop +="<td class=NLC_toplinks1><a href=/arabic/links/index.html class=NLC_toplinks2>مواقع مهمة</a></td>";
sTop +="<td width=20 align=center><img border=0 src=/arabic/images/home/top_line1.gif></td>";
sTop +="<td class=NLC_toplinks1><a href=/arabic/cust_services/contact_us.html class=NLC_toplinks2>اتصل بنا</a></td>";
sTop +="<td align=left><a href='/English/index.html'><img border=0 src=/arabic/images/home/english_logo.gif></a></td></tr></table></td></tr></table>";

sTop +="<table border=0 cellpadding=0 cellspacing=0 width=970 align=center><tr>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_crv1.gif></td>";
sTop +="<td><a href=/arabic/national_lease/chairman_info.html><img border=0 src=/arabic/images/home/toplink_1.gif></a></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_line1.gif></td>";
sTop +="<td><a href=/arabic/news/index.asp><img border=0 src=/arabic/images/home/toplink_2.gif></a></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_line1.gif></td>";
sTop +="<td><a href=/arabic/financial_reports/index.html><img border=0 src=/arabic/images/home/toplink_3.gif></a></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_line1.gif></td>";
sTop +="<td><a href=/arabic/subsidiary_companies/index.html><img border=0 src=/arabic/images/home/toplink_4.gif></a></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_line1.gif></td>";
sTop +="<td><a href=/arabic/national/index.html><img border=0 src=/arabic/images/home/toplink_6.gif></a></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_line1.gif></td>";
sTop +="<td><a href=/arabic/calculator/Calculator.asp><img border=0 src=/arabic/images/home/toplink_7.gif></a></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_line1.gif></td>";
sTop +="<td><a href=/arabic/gallery/index.html><img border=0 src=/arabic/images/home/toplink_5.gif></a></td>";
sTop +="<td><a href=/arabic/jobs/jobs.html><img border=0 src=/arabic/images/home/toplink_job.gif></a></td>";
sTop +="<td><a href=/arabic/map/index.html><img border=0 src=/arabic/images/home/toplink_map.gif></a></td>";
sTop +="<td width=300 style='background-image: url(/arabic/images/home/toplink_linenew.gif);background-repeat: repeat-x;width: 300px;height: 30px;'></td>";
sTop +="<td><img border=0 src=/arabic/images/home/toplink_crv2.gif></td></tr>";
sTop +="<tr><td colspan=19 bgcolor=#ffffff height=10><img border=0 src=/arabic/images/home/trick.gif width=1 height=10></td></tr></table>";

//sTop +="<td width=256 class=NLH_toplinksearchbg>";
//sTop +="<table border=0 cellpadding=0 cellspacing=0 width=256 height=30>";
//sTop +="<form name=searchformleft method=Post action=/arabic/search.asp ID=Form1><tr>";
//sTop +="<td width=156><img align=left border=0 src=/arabic/images/home/toplink_searchtext.gif></td>";
//sTop +="<td align=left width=100><input onkeypress=disallow() type=text name=SearchString style='height:19;' MAXLENGTH='100' VALUE='' //onkeypress=keytest() size=17>&nbsp;</td>";
//sTop +="<td><input type='image' style=cursor:hand border='0' src='/arabic/images/home/toplink_searchbutton.gif' onclick='return //fn_add1//()' ID=Image1 NAME=Image1></td>";
//sTop +="</tr></table></td>";



document.write(sTop);
}


function RightLink()
{
var sLink = "";

sLink += "<table border=0 width=143 id=table7 cellspacing=0 cellpadding=0>";
sLink += "<tr><td height=25 colspan=2></td></tr>";
sLink += "<tr><td width=15></td>";
sLink += "<td><a href=/arabic/national_lease/chairmeninfo.asp?chairid=1><img border=0 src=/arabic/images/right_link1.gif></a></td></tr>";
sLink += "<tr><td height=11 colspan=2></td></tr>";
sLink += "<tr><td></td>";
sLink += "<td><a href=/arabic/national/lease.html><img border=0 src=/arabic/images/right_link3.gif></a></td></tr>";
sLink += "<tr><td height=9 colspan=2></td></tr>";
sLink += "<tr><td></td>";
sLink += "<td><a href=/arabic/news/index.asp><img border=0 src=/arabic/images/right_link4.gif></a></td></tr>";
sLink += "<tr><td height=12 colspan=2></td></tr>";
sLink += "<tr><td></td>";
sLink += "<td><a href=/arabic/financial_reports/index.html><img border=0 src=/arabic/images/right_link5.gif></a></td></tr>";
sLink += "<tr><td height=11 colspan=2></td></tr>";
sLink += "<tr><td></td>";
sLink += "<td><a href=/arabic/subsidiary_companies/index.html><img border=0 src=/arabic/images/right_link6.gif></a></td></tr>";
sLink += "<tr><td height=8 colspan=2></td></tr>";
sLink += "<tr><td></td>";
sLink += "<td><a href=/arabic/gallery/index.html><img border=0 src=/arabic/images/right_link7.gif></a></td></tr>";
sLink += "</table>";

document.write(sLink);
}

function Bottom()
{
var sBottom = "";
sBottom +="<table border=0 cellpadding=0 cellspacing=0 width=970 align=center bgcolor=#ffffff ID=Table4>";
sBottom +="<tr><td colspan=3><img border=0 src=/arabic/images/home/trick.gif width=1 height=10></td></tr>";
sBottom +="<tr><td colspan=3 bgcolor=#CEE0F0><img border=0 src=/arabic/images/home/trick.gif width=1 height=5></td></tr>";
sBottom +="<tr><td><img border=0 src=/arabic/images/home/bottom_crv1.gif></td>";
sBottom +="<td align=center><img border=0 src=/arabic/images/home/copyright.gif></td>";
sBottom +="<td align=left><img border=0 src=/arabic/images/home/bottom_crv2.gif></td></tr></table>";
document.write(sBottom);
}

