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();}		
        }
        }	   
        


