function Set_Focus(AnInput)
{
    document.getElementById(AnInput).focus();
}



function SetMenuItem(AMenuItem) {
  switch (AMenuItem) {
    case 'about': rightmenu_about.firstChild.className = 'aboutActive'; break;   
    case 'Req':rightmenu_Req.firstChild.className = 'ReqActive'; break;
    case 'type':rightmenu_type.firstChild.className = 'typeActive'; break;
    case 'news':rightmenu_news.firstChild.className = 'newsActive'; break;
    case 'faq':rightmenu_faq.firstChild.className = 'faqActive'; break;
    case 'Download':rightmenu_download.firstChild.className = 'downloadActive'; break;
    case 'customer':rightmenu_customer.firstChild.className = 'customerActive'; break;
    case 'Document':rightmenu_document.firstChild.className = 'documentActive'; break;
    case 'career':rightmenu_NosaCareer.firstChild.className='careerActive'; break;
    case 'feedback': {rightmenu_NosaFeedback.firstChild.className='feedbackActive';  break;}
    case 'contact':rightmenu_Contact.firstChild.className='contactActive'; break;
    case 'nosanews':rightmenu_NosaNews.firstChild.className='nosanewsActive'; break;
    case 'pardis':rightmenu_Pardis.firstChild.className='pardisActive'; break;
    case 'supportupload':rightmenu_SupportUpload.firstChild.className='supportuploadActive'; break;
    case 'supportdownload':rightmenu_SupportDownload.firstChild.className='supportdownloadkActive'; break;
    case 'supportdocument':rightmenu_SupportDocument.firstChild.className='supportdocumentActive'; break;
    case 'supportfaq':rightmenu_SupportFAQ.firstChild.className='supportfaqActive'; break;
    case 'history': rightmenu_history.firstChild.className = 'historyActive'; break;
    case 'branch': rightmenu_Branch.firstChild.className = 'branchActive'; break;
  } 
}

function ResetProductMenu(){
  rightmenu_about.firstChild.className = 'aboutReset';   
  rightmenu_Req.firstChild.className = 'ReqReset';
  rightmenu_type.firstChild.className = 'typeReset';
  rightmenu_news.firstChild.className = 'newsReset';
  rightmenu_faq.firstChild.className = 'faqReset';
  rightmenu_download.firstChild.className = 'downloadReset'; 
  rightmenu_customer.firstChild.className = 'customerReset'; 
  rightmenu_document.firstChild.className = 'documentReset';
  rightmenu_history.firstChild.className = 'historyReset'; 
}

function  ResetNosaMenu(){
  rightmenu_NosaCareer.firstChild.className='careerReset';
  rightmenu_NosaFeedback.firstChild.className='feedbackReset';
  rightmenu_NosaNews.firstChild.className='nosanewsReset'; 
  rightmenu_Pardis.firstChild.className='pardisReset';
  rightmenu_Contact.firstChild.className='contactReset';
  rightmenu_Branch.firstChild.className='branchReset';
}

function ResetSupportMenu(){
  rightmenu_SupportUpload.firstChild.className='supportuploadReset'; 
  rightmenu_SupportDownload.firstChild.className='supportdownloadReset'; 
  rightmenu_SupportDocument.firstChild.className='supportdocumentReset'; 
  rightmenu_SupportFAQ.firstChild.className='supportfaqReset';
}

function SetDisabled(AProdName){
 switch(AProdName){   
  case 'XP':             

     document.getElementById('rightmenu_Req').firstChild.href="#";         
     document.getElementById('rightmenu_Req').firstChild.className ="ReqDisable";
    
     document.getElementById('rightmenu_download').firstChild.href="#";
     document.getElementById('rightmenu_download').firstChild.className="downloadDisable"; 
    break;    
   
    case 'Ghaf':
      document.getElementById('rightmenu_document').firstChild.href="#";
      document.getElementById('rightmenu_document').firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
      document.getElementById('rightmenu_faq').firstChild.href="#";
      document.getElementById('rightmenu_faq').firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      document.getElementById('rightmenu_history').firstChild.href="#";
      document.getElementById('rightmenu_history').firstChild.className = 'historyDisable';
      break;  
      
    case 'DigitalLibrary':
      document.getElementById('rightmenu_document').firstChild.href="#";
      document.getElementById('rightmenu_document').firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
      document.getElementById('rightmenu_faq').firstChild.href="#";
      document.getElementById('rightmenu_faq').firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      document.getElementById('rightmenu_history').firstChild.href="#";
      document.getElementById('rightmenu_history').firstChild.className = 'historyDisable';
      break;  
      
    case 'AccTotal':
  //    rightmenu_document.firstChild.disabled=true;
//      rightmenu_document.firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
  //    rightmenu_download.firstChild.disabled=true;
      //rightmenu_download.firstChild.className = 'downloadDisable'; 
  //    rightmenu_faq.firstChild.disabled=true;
      //rightmenu_faq.firstChild.className = 'faqDisable';
  //    rightmenu_news.firstChild.disabled=true;
    //  rightmenu_news.firstChild.className = 'newsDisable'; 
   //   rightmenu_Req.firstChild.disabled=true;
      //rightmenu_Req.firstChild.className = 'ReqDisable';
   //   rightmenu_history.firstChild.disabled=true;
      //rightmenu_history.firstChild.className = 'historyDisable';
      break;  
      
    case 'RFID':
      document.getElementById('rightmenu_document').firstChild.href="#";
      document.getElementById('rightmenu_document').firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
      document.getElementById('rightmenu_faq').firstChild.href="#";
      document.getElementById('rightmenu_faq').firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      document.getElementById('rightmenu_history').firstChild.href="#";
      document.getElementById('rightmenu_history').firstChild.className = 'historyDisable';
      break;  
      
    case 'Pay'  :
      document.getElementById('rightmenu_history').firstChild.href="#";
      document.getElementById('rightmenu_history').firstChild.className = 'historyDisable';
      break;
      
    case 'Asset'  :
      document.getElementById('rightmenu_history').firstChild.href="#";
      document.getElementById('rightmenu_history').firstChild.className = 'historyDisable';
      break;  
      
    case 'Repository':
      document.getElementById('rightmenu_document').firstChild.href="#";
      document.getElementById('rightmenu_document').firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
      document.getElementById('rightmenu_faq').firstChild.href="#";
      document.getElementById('rightmenu_faq').firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      document.getElementById('rightmenu_history').firstChild.href="#";
      document.getElementById('rightmenu_history').firstChild.className = 'historyDisable';
      break;  
      
     case 'ReceiptPay':
    //  rightmenu_document.firstChild.disabled=true;
      //rightmenu_document.firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
      //rightmenu_faq.firstChild.disabled=true;
      //rightmenu_faq.firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      //rightmenu_history.firstChild.disabled=true;
      //rightmenu_history.firstChild.className = 'historyDisable';
      break;  
      
    case 'INV':      
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
  //    rightmenu_faq.firstChild.disabled=true;
  //    rightmenu_faq.firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      break;  
      
    case 'SPPM':
      document.getElementById('rightmenu_document').firstChild.href="#";
      document.getElementById('rightmenu_document').firstChild.className = 'documentDisable';
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_download').firstChild.href="#";
      document.getElementById('rightmenu_download').firstChild.className = 'downloadDisable'; 
      document.getElementById('rightmenu_faq').firstChild.href="#";
      document.getElementById('rightmenu_faq').firstChild.className = 'faqDisable';
      document.getElementById('rightmenu_news').firstChild.href="#";
      document.getElementById('rightmenu_news').firstChild.className = 'newsDisable'; 
      document.getElementById('rightmenu_Req').firstChild.href="#";
      document.getElementById('rightmenu_Req').firstChild.className = 'ReqDisable';
      break;  
      
    case 'Loan':     
      document.getElementById('rightmenu_customer').firstChild.href="#";
      document.getElementById('rightmenu_customer').firstChild.className = 'customerDisable';
      document.getElementById('rightmenu_faq').firstChild.href="#";
      document.getElementById('rightmenu_faq').firstChild.className ='faqDisable';            
 }
}

function OpenPardisView(PardisViewName){
   window.open(PardisViewName, '', 'width=640px, height=480px, scrollbars=no, location=no, menubar=no, titlebar=no, toolbar=no, left=30px, top=30px');
}

function setToView(){
	   if (typeof(Customer1_AccPanel)=='object'){
		       Customer1_AccPanel.scrollIntoView(true);}
		   if (typeof(Customer1_LibPanel)=='object'){
		       Customer1_LibPanel.scrollIntoView(true);}
}

function SetFocus(elem){
	if (event.keyCode == 13)
	{							
        var control = document.getElementById(elem);
        if( control != null ){control.focus();}		
        }
        }	   

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
        


