//-- Script for Google Analytics 
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-23546293-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
//-- Google Analytics

// JavaScript Document
if( section == 'home')
        {
document.write('<table align="center" border="0" width="905" id="table1" cellspacing="0" cellpadding="0">'
                                +'<tr><td height="20"></td></tr>'
                                +'<tr>'
                                +'<td width="250"  rowspan="2"><a href="http://www.samba.com"><img src="../GblImages/sambaonline-logo-arabic.gif" width="201" height="55" border="0"></a></td>'
                                +'<td align="left" class="utilbar"><a href="Common/HTML/aboutSamba_01_01_ar.html">عن سامبا</a> | <a href="Common/HTML/ContactUs_01_01_ar.html">الاتصال بنا</a> | <a href="Common/HTML/countries_01_01_ar.html">التواجد الدولي</a> | <a href="http://sambacapital.samba.com/Arabic/Consumer/HTML/consSambaCapital_01_01_ar.html" target="_Samba">سامبا كابيتال</a> | <a href="Common/HTML/SambaMobile_01_01_ar.html">سامباموبايل</a> | <a href="Common/HTML/AtmsBranches_01_01_ar.asp">الصراف الآلي</a> | <a href="Common/HTML/AtmsBranches_01_01_ar.asp">الفروع</a> | <a href="Common/HTML/sambaCareers_01_01_ar.html">الوظائف</a> | <a href="Common/HTML/siteIndex_01_01_ar.html">خريطة الموقع</a> |<a href="javascript:switchToEnglish(); createck();">English</a> </td>'
                                +'</tr>'
                                +'<tr>'
                                +'<td align="left" valign="left" class="utilbar" height="20" > <form name=myform id=myform style="display:inline;" method=GET onSubmit="return enc0();" accept-charset="utf-8"><input type="hidden" value = "" accept-charset="utf-8" size="26" maxlength="75" name="q" id="q" title="Search" tabindex="1" height="25" />&nbsp;<input type="text" value = "" accept-charset="utf-8" size="26" maxlength="75" name="q1" id="q1" title="Search" tabindex="1" height="25" />&nbsp;<input type="image" tabindex="1" src="../GblImages/search_but_ar.gif" alt="Search" name="searchBtn" id="searchBtn"  /> </form> </td>'
                                +'</tr>'
                                +'</table>');
                                          
          }
else
if (section == 'common')
{
document.write('<table align="center" border="0" width="905" id="table1" cellspacing="0" cellpadding="0">'
                 +'<tr>'
                +'<td width="250"  rowspan="2"><a href="http://www.samba.com"><img src="../../../GblImages/sambaonline-logo-arabic.gif" width="201" height="55" border="0"></a></td>'
                +'<td align="left" class="utilbar"><a href="http://'+ location.host +'/arabic/Common/HTML/aboutSamba_01_01_ar.html">عن سامبا</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/ContactUs_01_01_ar.html">الاتصال بنا</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/countries_01_01_ar.html">التواجد الدولي</a> | <a href="http://sambacapital.samba.com/Arabic/Consumer/HTML/consSambaCapital_01_01_ar.html" target="_Samba">سامبا كابيتال</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/SambaMobile_01_01_ar.html">سامباموبايل</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/AtmsBranches_01_01_ar.asp">الصراف الآلي</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/AtmsBranches_01_01_ar.asp">الفروع</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/sambaCareers_01_01_ar.html">الوظائف</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/siteIndex_01_01_ar.html">خريطة الموقع</a> |<a href="javascript:switchToEnglish(); createck(); ">English</a> </td>'
                +'</tr>'
                +'<tr>'
                +'<td align="left" valign="left" class="utilbar" height="20" > <form name=myform id=myform style="display:inline;" method=GET onSubmit="return enc();" accept-charset="utf-8"><input type="hidden" value = "" accept-charset="utf-8" size="26" maxlength="75" name="q" id="q" title="Search" tabindex="1" height="25" />&nbsp;<input type="text" value = "" accept-charset="utf-8" size="26" maxlength="75" name="q1" id="q1" title="Search" tabindex="1" height="25" />&nbsp;<input type="image" tabindex="1" src="../../../GblImages/search_but_ar.gif" alt="Search" name="searchBtn" id="searchBtn"  /> </form> </td>'
                +'</tr>'
                +'</table>');

}
else
        {
document.write('<table align="center" border="0" width="905" id="table1" cellspacing="0" cellpadding="0">'
                                +'<tr>'
                                +'<td width="250"  rowspan="2"><a href="http://www.samba.com"><img src="../../../GblImages/sambaonline-logo-arabic.gif" width="201" height="55" border="0"></a></td>'
                                +'<td align="left" class="utilbar"><a href="http://'+ location.host +'/arabic/Common/HTML/aboutSamba_01_01_ar.html">عن سامبا</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/ContactUs_01_01_ar.html">الاتصال بنا</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/countries_01_01_ar.html">التواجد الدولي</a> | <a href="http://sambacapital.samba.com/Arabic/Consumer/HTML/consSambaCapital_01_01_ar.html" target="_Samba">سامبا كابيتال</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/SambaMobile_01_01_ar.html">سامباموبايل</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/AtmsBranches_01_01_ar.asp">الصراف الآلي</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/AtmsBranches_01_01_ar.asp">الفروع</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/sambaCareers_01_01_ar.html">الوظائف</a> | <a href="http://'+ location.host +'/arabic/Common/HTML/siteIndex_01_01_ar.html">خريطة الموقع</a> |<a href="javascript:switchToEnglish(); createck(); ">English</a></td>'
                                +'</tr>'
                                 +'<tr>'
                                +'<td align="left" valign="left" class="utilbar" height="20" > <form name=myform id=myform style="display:inline;" method=GET onSubmit="return enc1();" accept-charset="utf-8"><input type="hidden" value = "" accept-charset="utf-8" size="26" maxlength="75" name="q" id="q" title="Search" tabindex="1" height="25" />&nbsp;<input type="text" value = "" accept-charset="utf-8" size="26" maxlength="75" name="q1" id="q1" title="Search" tabindex="1" height="25" />&nbsp;<input type="image" tabindex="1" src="../../../GblImages/search_but_ar.gif" alt="Search" name="searchBtn" id="searchBtn"  /> </form> </td>'
                                  +'</tr>'
                                +'</table>');
          
          }

function enc() {
qtxt = document.getElementById("q1").value;
qctl = document.getElementById("q");
qctl2 = document.getElementById("q1");
qctl.value = enc2(encodeURIComponent(qtxt));
qctl2.value = "";
document.myform.action="http://www.samba.com/Arabic/Common/HTML/searchsamba_01_01_ar.html";
document.myform.submit();
return true;
}

function enc0() {
qtxt = document.getElementById("q1").value;
qctl = document.getElementById("q");
qctl2 = document.getElementById("q1");
qctl.value = enc2(encodeURIComponent(qtxt));
qctl2.value = "";
document.myform.action="http://www.samba.com/Arabic/Common/HTML/searchsamba_01_01_ar.html";
document.myform.submit();
return true;
}

function enc1() {
qtxt = document.getElementById("q1").value;
qctl = document.getElementById("q");
qctl2 = document.getElementById("q1");
qctl.value = enc2(encodeURIComponent(qtxt));
qctl2.value = "";
document.myform.action="http://www.samba.com/Arabic/Common/HTML/searchsamba_01_01_ar.html";
document.myform.submit();
return true;
}

function enc2(urlstr){
var str1=new String(urlstr);
var str2 = str1.replace("%20", " ");
var newstr="";
var lanflag="";
//alert("idx "+str2.lastIndexOf("%")+" len "+str2.length);
if (str2.substr(0,1) == "%" && str2.lastIndexOf("%") == str2.length - 3)
lanflag="_AR";

if (lanflag == "_AR"){
for (var ctr=0; ctr < urlstr.length; ctr++){
   if (urlstr.substr(ctr,1) != "%") {
        newstr = newstr + urlstr.substr(ctr,1);
    }
}
}
else
{
    newstr = decodeURIComponent(urlstr);
}
        
newstr = newstr+lanflag;
return newstr;
}          

function qclear(){
qctl = document.getElementById("q");
qctl.value = "";
}


