<html> 
   <head> 
<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<link rel="stylesheet" href='stylemain.css' type='text/css'>
<link rel="stylesheet" href='colors.css' type='text/css'>
<script language="javascript" src="util.js"></script>
<script type="text/javascript" src="lang/b28n.js"></script>
<script language="javascript"><%ejGetOther(forbidHTMLCode)%></script>
<script language="javascript"> 
var ba1= '<%ejGetVoice(bareMgcAddr1)%>';    
var mp1 = '<%ejGetVoice(mgcAddr1Port)%>';
var ba2 = '<%ejGetVoice(bareMgcAddr2)%>';    
var mp2 = '<%ejGetVoice(mgcAddr2Port)%>';  
var ss = '<%ejGetVoice(snowSlide)%>';
var tn1 = '<%ejGetVoice(termName1)%>';
var tn2 = '<%ejGetVoice(termName2)%>';
var rn1 = '<%ejGetVoice(rtpPrefix)%>';  
var rn2 = '<%ejGetVoice(rtpNameScope)%>';
var rn3 = '<%ejGetVoice(rtpBase)%>';
var pc = 'G711U,G711A,G723,G729,';
var  an= '<%ejGetVoice(authName)%>';
var  ak= '<%ejGetVoice(authKey)%>';
var  tt= '<%ejGetVoice(transportType)%>';
var  dr= '<%ejGetVoice(dtmfRelay)%>';
var  ve= '<%ejGetVoice(vadEnable)%>';
var  ig= '<%ejGetVoice(ingressGain)%>';
var  eg= '<%ejGetVoice(egressGain)%>';
var  hd= '<%ejGetVoice(dscpMark)%>';
var  hv= '<%ejGetVoice(vlanIdMark)%>';
var  mp= '<%ejGetVoice(mgPort)%>';
var  mn= '<%ejGetVoice(mgName)%>';
var  ifc= '<%ejGetVoice(ifName)%>';
var  am= '<%ejGetVoice(authMehtod)%>';
var  et= '<%ejGetVoice(encodingType)%>';
var  jtb= '<%ejGetVoice(jitterBuffer)%>';
var  jtm= '<%ejGetVoice(jitterBufferMode)%>';   
var  mtv= '<%ejGetVoice(mgTopVersion)%>';
var  dmm= '<%ejGetVoice(digitMapMod)%>';
var  mif= '<%ejGetVoice(midFormat)%>';
var  mef= '<%ejGetVoice(messageFormat)%>';
var  dst= '<%ejGetVoice(digitMapStartTimer)%>';
var  dlm= '<%ejGetVoice(digitMapLongTimer)%>'; 
var  dsm= '<%ejGetVoice(digitMapShortTimer)%>';
var  ftm= '<%ejGetVoice(faxTransMod)%>';   
var  fnm= '<%ejGetVoice(faxNegoMod)%>';   
var  rpt= '<%ejGetVoice(rfc2198PT)%>';
var  vre= '<%ejGetVoice(vbdRed)%>';
var  vc= '<%ejGetVoice(vbdCodec)%>';
var  ece= '<%ejGetVoice(echoCancel)%>';
var  hbt= '<%ejGetVoice(heartBeatTime)%>';
var  rt= '<%ejGetVoice(rfc2833PT)%>';
var  pt= '20,20,30,20,20';
var ifList  = '<%ejGetVoice(ifList)%>';
var locList = '<%ejGetVoice(localeList)%>';
var selectedLocale = '<%ejGetVoice(localeName)%>';
var voiceRunning = '<%ejGetVoice(voiceStatus)%>';
var sessionKey ='<%ejGetOther(sessionKey)%>';

setLanguage('<%ejGet(webUILanguage)%>'); 
Butterlate.setTextDomain("voip");
function initTranslation() {
      var idArray = new Array("voiceh248_tite","voiceh248_tips1","voiceh248_tips2","voiceh248_tips3","voiceh248_tips4","voiceh248_tips5","voiceh248_sadSpt","voiceh248_enbBte","voiceh248_dtmf","voiceh248_rng96",
	  	"voiceh248_messFor","voiceh248_traMode","voiceh248_trmode","voiceh248_deInde","voiceh248_enbRe","voiceh248_2198","voiceh248_rng127","voiceh248_diMaMode","voiceh248_mini","voiceh248_max",
	  	"voiceh248_diStrCou","voiceh248_ran99","voiceh248_digiLonC","voiceh248_rang99","voiceh248_digiShorCou","voiceh248_r199","voiceh248_sinalPri","voiceh248_ran7","voiceh248_rtp","voiceh248_rang7",
	  	"voiceh248_jittBu","voiceh248_dynamic","voiceh248_static","voiceh248_staJit","voiceh248_ran180","voiceh248_heartL","voiceh248_ran655","voiceh248_snowSlip","voiceh248_r6000","voiceh248_proLease",
	  	"voiceh248_ran4","voiceh248_send","voiceh248_receive","voiceh248_start","voiceh248_pause","voiceh248_save");
	setAllIdValue(idArray);
}
																																			  
function addParamsToQuery(loc_init, current_view) {                                                                                                                                       
   var loc = loc_init;                                                    

   with ( document.forms[0] ) {
   	 loc += 'currentview=' + current_view; 													  
	   if(current_view == 'basic') {												   
           if ( isValueNull( bareMgcAddr1.value,bareMgcAddr2.value ) == false )  {      
         if ( Bakmgc1Info.checked == true ) {                                           
           if ( isValidMGCAddress( 64,bareMgcAddr1.value) == true )  {      
             }                                                                             
           else{        
                    msg =  bareMgcAddr1.value + _("voiceh248_notValidMac");  
                    alert( msg );           
                    return;              
                  }                                                                               
 		}																				
 	else {		 
 				 bareMgcAddr1.value =  '0.0.0.0';		
  				 mgcAddr1Port.value = '2944';		  
         }                                                                               
         if ( Bakmgc2Info.checked == true ) {                                           
           if ( isValidMGCAddress( 64,bareMgcAddr2.value) == true )  {      
             }                                                                             
           else{        
                    msg =  bareMgcAddr2.value + _("voiceh248_notValidSt");  
                    alert( msg );           
                    return;              
                  }                                                                               
 		}																				
 	else {		 
 				 bareMgcAddr2.value =  '0.0.0.0';		
  				 mgcAddr2Port.value = '2944';		  
         }                                                                               
         if (( Bakmgc1Info.checked == false )&&( Bakmgc2Info.checked == false )) {                                           
 				 bareMgcAddr1.value =  '192.168.99.99';		
  				 mgcAddr1Port.value = '2944';		  
         }                                                                               
           }                                                                               
           else{        
                    msg =  bareMgcAddr1.value + _("voiceh248_notValidSt"); 
                    alert( msg );           
                    return;              
             }                                                                               
			if ( isValidClientPortforH248(2900, 2999, mgPort.value ) == true )  {	  
			  } 																			
			else{		 
					 msg =	mgPort.value + _("voiceh248_notValidP"); 
					 alert( msg );			 
					 return;			  
			  } 																			  
           if ( isValidServerPortforH248( mgcAddr1Port.value ) == true )  {      
             }                                                                             
           else{        
                    msg =  mgcAddr1Port.value + _("voiceh248_notValidmacP");  
                    alert( msg );           
                    return;              
             }                                                                               
           if ( isValidServerPortforH248( mgcAddr2Port.value ) == true )  {      
             }                                                                             
           else{        
                    msg =  mgcAddr2Port.value +_("voiceh248_notValidStP");
                    alert( msg );           
                    return;              
             }                                                                               
           if ( isValidLenforH248(17, authName.value ) == true )  {      
             }                                                                             
           else{        
                    msg =  authName.value + _("voiceh248_invalidGtID");
                    alert( msg );           
                    return;              
             }                                                                               
           if ( isValidLenforH248(17, authKey.value ) == true )  {      
             }                                                                             
           else{        
                    msg =  authKey.value + _("voiceh248_invalidPriK");
                    alert( msg );           
                    return;              
             }                                                                               
		   if ( isValidLenforH248(65, mgName.value ) == true )	{
			 }												   
		   else{		
					msg =  mgName.value + _("voiceh248_invalidName");
					alert( msg );			
					return; 			 
			 }												 
																					   
	     loc += '&ifName=' + ifName.value; 											  
      loc += '&bareMgcAddr1=' + bareMgcAddr1.value;                                                
      loc += '&mgcAddr1Port=' + mgcAddr1Port.value;                                                
      loc += '&bareMgcAddr2=' + bareMgcAddr2.value;                                                
      loc += '&mgcAddr2Port=' + mgcAddr2Port.value;                                                
      loc += '&authMehtod=' + authMehtod.value;                                                
      loc += '&encodingType=' + encodingType.value;                                                                                        
		   if ( isValidLenforH248TermName(65, termName1.value ) == true )	{
			 }												   
		   else{		
					msg =  termName1.value + _("voiceh248_invalidTID");
					alert( msg );			
					return; 			 
			 }												 
      loc += '&termName1=' + termName1.value;          
		   if ( isValidLenforH248TermName(65, termName2.value ) == true )	{
			 }												   
		   else{		
					msg =  termName2.value + _("voiceh248_invalidTID");
					alert( msg );			
					return; 			 
			 }												 
      loc += '&termName2=' + termName2.value;          
		   if ( isValidforH248RtpName(65, rtpPrefix.value ) == true )	{
			 }										   
		   else{		
					msg =  rtpPrefix.value + _("voiceh248_invalidRTP");
					alert( msg );			
					return; 			 
			 }										 
		   if ( isValidValue2forH248(2, 128, rtpNameScope.value ) == true )	{
			 }										   
		   else{		
					msg =  rtpNameScope.value +_("voiceh248_invalidtempPCont");
					alert( msg );			
					return; 			 
			 }										 
	  loc += '&rtpPrefix=' + rtpPrefix.value; 			   
	  loc += '&rtpNameScope=' + rtpNameScope.value;
	  loc += '&rtpBase=' + rtpBase.value; 			   
         pt = '';                    
         pt += G711U.value+ ',';                         
         pt += G711A.value + ',';                         
         pt += G723.value + ',';                         
         pt += G729.value + ',';                         
         pt += G722.value + ',';                         
      loc += '&packetTime=' + pt;                                       
	   loc += '&localeName=' + localeName.value;									   
	   loc += '&authName=' + encodeUrl(authName.value);									   
	   loc += '&authKey=' + authKey.value;									   
	   loc += '&transportType=' + transportType.value;										 
	   loc += '&mgPort=' + mgPort.value;										 
	   loc += '&mgName=' + mgName.value;									   
     loc += '&midFormat=' + midFormat.value;                
	   }																			   
	   if(current_view == 'advanced') { 												  
		   if ( isValidValue2forH248( 0,7,vlanIdMark.value ) == true )  {	 
			 }																			   
		   else{		
					msg =  vlanIdMark.value + _("voiceh248_invalidRTPP");
					alert( msg );			
					return; 			 
			 }																				 
 		  if ( isValidValue2forH248( 0,7,dscpMark.value ) == true )  { 	
 			}																			  
 		  else{ 	   
 				   msg =  dscpMark.value + _("voiceh248_invalidSnP");
 				   alert( msg );		   
 				   return;				
 			}																				
		  if ( isValidValue2forH248(0, 6000, snowSlide.value ) == true )  {	
			}																			  
		  else{ 	   
				   msg =  snowSlide.value + _("voiceh248_invldtime");
				   alert( msg );		   
				   return;				
			}																				
		  if ( isValidValue2forH248(1, 4, mgTopVersion.value ) == true )  {	
			}																			  
		  else{ 	   
				   msg =  mgTopVersion.value +_("voiceh248_invldProRe");
				   alert( msg );		   
				   return;				
			}																				
		  if ( isValidValue2forH248(5, 655, heartBeatTime.value ) == true )  {	
			}																			  
		  else{ 	   
				   msg =  heartBeatTime.value + _("voiceh248_invldfrTme");
				   alert( msg );		   
				   return;				
			}																				
      loc += '&heartBeatTime=' + heartBeatTime.value;                
         if ( dtmfRelay.value == '1' ) {                                             
            loc += '&dtmfRelay=' + dtmfRelay.value;                                    
            if ( isValidValue2( 96,127,rfc2833PT.value ) == true ){
               if ( isEqualValue( rfc2198PT.value,rfc2833PT.value) == true )
               {
                  msg =_("voiceh248_cannotSame");
                  alert( msg );
                  return;
               }
            }
            else{
                msg =  rfc2833PT.value +_("voiceh248_invld2833");
                alert( msg );
                 return;
            } 
            loc += '&rfc2833PT=' + rfc2833PT.value;                                    
         }                                                                               
         else {                                                                          
            loc += '&dtmfRelay=' + dtmfRelay.value;                                    
         }                                                                               
		   if ( isValidValue2forH248( 1,99,digitMapStartTimer.value ) == true )  {	 
			 }																			   
		   else{		
					msg =  digitMapStartTimer.value +_("voiceh248_invldCouTm");
					alert( msg );			
					return; 			 
			 }																				 
      loc += '&digitMapStartTimer=' + digitMapStartTimer.value;                
		   if ( isValidValue2forH248( 1,99,digitMapLongTimer.value ) == true )  {	 
			 }																			   
		   else{		
					msg =  digitMapLongTimer.value +_("voiceh248_invlddigCou");
					alert( msg );			
					return; 			 
			 }																				 
      loc += '&digitMapLongTimer=' + digitMapLongTimer.value;                
		   if ( isValidValue2forH248( 1,99,digitMapShortTimer.value ) == true )  {	 
			 }																			   
		   else{		
					msg =  digitMapShortTimer.value + _("voiceh248_invldcouVld");
					alert( msg );			
					return; 			 
			 }																				 
      loc += '&digitMapShortTimer=' + digitMapShortTimer.value;                
      loc += '&messageFormat=' + messageFormat.value;                
      loc += '&digitMapMod=' + digitMapMod.value;                
      loc += '&faxTransMod=' + faxTransMod.value;                
      loc += '&faxNegoMod=' + faxNegoMod.value;                
      loc += '&vbdCodec=' + vbdCodec.value;                
         if ( echoCancel.checked == true ) {                                             
            loc += '&echoCancel=1';                                                    
         }                                                                               
         else {                                                                          
            loc += '&echoCancel=0';                                                     
         }                                                                               
         if ( vbdRed.checked == true ) {                                             
            loc += '&vbdRed=1';                                                    
         }                                                                               
         else {                                                                          
            loc += '&vbdRed=0';                                                     
         }                                                                               
		   if ( isValidValue2forH248( 96,127,rfc2198PT.value ) == true )  {	 
			 }																			   
		   else{		
					msg =  rfc2198PT.value + _("voiceh248_invld2198");
					alert( msg );			
					return; 			 
			 }																				 
      loc += '&rfc2198PT=' + rfc2198PT.value;                
        if ( isValidValue2( 0,180,jitterBuffer.value ) == true )   {    
          }                                                         
        else{     
               msg =   jitterBuffer.value + _("voiceh248_invldJit");
               alert( msg );        
               return;         
          }                                                           
      loc += '&jitterBuffer=' + jitterBuffer.value;                                       
      loc += '&jitterBufferMode=' + jitterBufferMode.value;                                       
         if ( vadEnable.checked == true ) {                                             
            loc += '&vadEnable=1';                                                    
         }                                                                               
         else {                                                                          
            loc += '&vadEnable=0';                                                     
         }                                                                               
	   loc += '&ingressGain=' + ingressGain.value;										 
	   loc += '&egressGain=' + egressGain.value;									   
	   loc += '&dscpMark=' + dscpMark.value;									   									   
	   loc += '&vlanIdMark=' + vlanIdMark.value;									   
      loc += '&snowSlide=' + snowSlide.value;                                                
      loc += '&mgTopVersion=' + mgTopVersion.value;                                                
	   }																			   
	}																				   
   return loc;                                                                        
}  

function btnStartH248(current_view) {
   var loc = 'voiceh248start.cmd?';

   loc += addParamsToQuery( loc, current_view );   

   //Stripping quotes and spaces
   loc = loc.replace(/['" ]/g,'');

   loc += '&sessionKey=' + sessionKey;
   var code = 'location="' + loc + '"';
   eval(code);
}


function btnStopH248(current_view) {
   var loc = 'voiceh248stop.cmd?';

   loc += addParamsToQuery( loc, current_view );
   
   //Stripping quotes and spaces
   loc = loc.replace(/['" ]/g,'');

   loc += '&sessionKey=' + sessionKey;
   var code = 'location="' + loc + '"';
   eval(code);
}


function btnApplyH248(current_view) {
   var loc = 'voiceh248apply.cmd?';

   loc += addParamsToQuery( loc, current_view );
   
   //Stripping quotes and spaces
   loc = loc.replace(/['" ]/g,'');

   loc += '&sessionKey=' + sessionKey;
   var code = 'location="' + loc + '"';
   eval(code);
}

function enableButtons(){
   var buttonStart = document.getElementById("startH248cBtn");
   var buttonStop = document.getElementById("stopH248cBtn");
   var buttonApply = document.getElementById("applyH248cBtn");
   
   if ( voiceRunning == 1 ) {
      buttonStart.disabled = true;
      buttonStop.disabled = false;
      buttonApply.disabled = false;
   } else {
      buttonStart.disabled = false; 
      buttonStop.disabled = true;
      buttonApply.disabled = true;
   }
}
                                                                                   
function frmLoad(current_view) {                                                      
   with ( document.forms[0] ) {
         initTranslation();
   	  enableButtons();                                                       
      if(current_view == 'basic') {                                                   
	     ifName.value = ifc; 					
      bareMgcAddr1.value = ba1;                                                              
      mgcAddr1Port.value = mp1;                                                              
      bareMgcAddr2.value = ba2;                                                              
      mgcAddr2Port.value = mp2;                                                              
	     termName1.value = tn1;				   
	     termName2.value = tn2;				   
	     rtpPrefix.value = rn1;			        
	     rtpNameScope.value = rn2;
	     rtpBase.value = rn3;			        
      if ( pt ){                          
         var temp = new Array();             
            temp = pt.split(',');                   
            G711U.value = temp[0];   
            G711A.value = temp[1];   
            G723.value = temp[2];   
            G729.value = temp[3];   
            G722.value = temp[4];   
      }                           
      localeName.value = selectedLocale;                                                          
      transportType.value = tt;                                                          
      authMehtod.value = am;                                                          
	     if(am =='0')		      	 
	     {										
	        hideAuthInfo(1);										
	     }        									
	     else{										
	        hideAuthInfo(0);										
	     }        									
      authName.value = an;                                                          
      authKey.value = ak;                                                          
	     encodingType.value = et; 		            					 
      mgPort.value = mp;                                                          
      midFormat.value = mif;                                                          
	     if(mif =='0')		      	 
	     {										
	        hideMgNameifo(0);										
	     }        									
	     else{										
	        hideMgNameifo(1);										
	     }        									
      mgName.value = mn;                                                          
         if (ba1 != '0.0.0.0') {                                  
            Bakmgc1Info.checked = true;                                                    
            hidebakmgc1Info(0);                                                            
         } else {                                                                        
            Bakmgc1Info.checked = false;                                                   
            hidebakmgc1Info(1);                                                            
         }                                                                               
         if (ba2 != '0.0.0.0') {                                  
            Bakmgc2Info.checked = true;                                                    
            hidebakmgc2Info(0);                                                            
         } else {                                                                        
            Bakmgc2Info.checked = false;                                                   
            hidebakmgc2Info(1);                                                            
         }
         
         if('<%ejGetVisible(localeNameinfo)%>' == 'visible'){
              hidelocaleNameinfo(0);
         } else {
              hidelocaleNameinfo(1);
         }                                                                               
      }                                                                                  
      if(current_view == 'advanced'){                                                 
      dtmfRelay.value = dr.toUpperCase();
         if (dtmfRelay.value != '1') {                                  
            hidepayload(1);                                                            
         } else {                                                                        
            hidepayload(0);                                                            
         }                                                                               
      rfc2833PT.value = rt;
      digitMapMod.value = dmm;
      messageFormat.value = mef;
      digitMapStartTimer.value = dst;
      digitMapLongTimer.value = dlm;
      digitMapShortTimer.value = dsm;
      faxTransMod.value = ftm;
      faxNegoMod.value = fnm;
      rfc2198PT.value = rpt;
      vbdRed.value = vre;
         if(vre == '1'){
            vbdRed.checked = true;
         } else {
            vbdRed.checked = false;
         }
      vbdCodec.value = vc;
      echoCancel.value = ece;
         if(ece == '1'){
            echoCancel.checked = true;
         } else {
            echoCancel.checked = false;
         }
      heartBeatTime.value = hbt;                                                          
      ingressGain.value = ig;                                                          
      egressGain.value = eg;                                                          
      dscpMark.value = hd;                                                          
      vlanIdMark.value = hv;                                                          
      jitterBuffer.value = jtb;                                                          
      jitterBufferMode.value = jtm;                                                          
	     snowSlide.value = ss;										
      mgTopVersion.value = mtv;                                                
         vadEnable.value = ve.toUpperCase();
         if(ve == '1'){
            vadEnable.checked = true;
         } else {
            vadEnable.checked = false;
         }
      }                                                                                  
   }                                                                                
}                                                                                     
function hideAuthInfo(hide) {                                                     
   var status = 'block';                                                            
                                                                                      
   if ( hide == 1 )                                                                   
      status = 'none';                                                              
   if (document.getElementById)  // DOM3 = IE5, NS6                                   
      document.getElementById('authInfo').style.display = status;              
   else {                                                                             
      if (document.layers == false) // IE4                                            
         document.all.authInfo.style.display = status;                         
   }                                                                                  
}                                                                                     
function hideMgNameifo(hide) {                                                     
   var status = 'block';                                                            
                                                                                      
   if ( hide == 1 )                                                                   
      status = 'none';                                                              
   if (document.getElementById)  // DOM3 = IE5, NS6                                   
      document.getElementById('mgNameInfo').style.display = status;              
   else {                                                                             
      if (document.layers == false) // IE4                                            
         document.all.mgNameInfo.style.display = status;                         
   }                                                                                  
}                                                                                     
function midFormatcbClick(cb) { 														  
   if ( cb.value == '0')														  
	  hideMgNameifo(0); 															  
   else 																			  
	  hideMgNameifo(1); 															  
}																					  
function authMethodcbClick(cb) { 														  
   if ( cb.value == '0' )														  
	  hideAuthInfo(1); 															  
   else 																			  
	  hideAuthInfo(0); 															  
}																					  
function hidepayload(hide) {                                                    
   var status = 'block';                                                            
                                                                                      
   if ( hide == 1 )                                                                   
      status = 'none';                                                              
   if (document.getElementById)  // DOM3 = IE5, NS6                                   
      document.getElementById('rfc2833PT').style.display = status;                  
   else {                                                                             
      if (document.layers == false) // IE4                                            
         document.all.rfc2833PT.style.display = status;                            
   }                                                                                  
}                                                                                     
function dtmfRelayCbClick(cb) {                                                           
   if ( cb.value == '1' )                                                          
      hidepayload(0);                                                               
   else                                                                               
      hidepayload(1);                                                               
}                                                                                     
function hidebakmgc1Info(hide) {                                                          
   var status = 'block';                                                            
                                                                                      
   if ( hide == 1 )                                                                   
      status = 'none';                                                              
   if (document.getElementById)  // DOM3 = IE5, NS6                                   
      document.getElementById('MGC1Info').style.display = status;                   
   else {                                                                             
      if (document.layers == false) // IE4                                            
         document.all.MGC1Info.style.display = status;                              
   }                                                                                  
}                                                                                     
function Bakmgc1CbClick(cb) {                                                        
   if ( cb.checked == true )                                                          
      hidebakmgc1Info(0);                                                            
   else                                                                               
      hidebakmgc1Info(1);                                                            
}                                                                                     
function hidebakmgc2Info(hide) {                                                          
   var status = 'block';                                                            
                                                                                      
   if ( hide == 1 )                                                                   
      status = 'none';                                                              
   if (document.getElementById)  // DOM3 = IE5, NS6                                   
      document.getElementById('MGC2Info').style.display = status;                   
   else {                                                                             
      if (document.layers == false) // IE4                                            
         document.all.MGC2Info.style.display = status;                              
   }                                                                                  
}                                                                                     
function Bakmgc2CbClick(cb) {                                                        
   if ( cb.checked == true )                                                          
      hidebakmgc2Info(0);                                                            
   else                                                                               
      hidebakmgc2Info(1);                                                            
}                                                                                     
function cbClick(cb) {                                                           
}

function hidelocaleNameinfo(hide) {
   var status = 'block';

   if ( hide == 1 )
   {
      status = 'none';
   }
   if (document.getElementById)  // DOM3 = IE5, NS6
   {
      document.getElementById('localeNamediv').style.display = status;   
   }
   else {
      if (document.layers == false) // IE4
      {
         document.all.localeNamediv.style.display = status;    
	  }
   }
}

function printInterfaceListBox(){
   var tokInterfaceList = ifList.split(" ");

   for(i = 0; i < tokInterfaceList.length; i++)
   {
      document.writeln("<option value=\"" + tokInterfaceList[i] + "\" selected>");  
      document.writeln(tokInterfaceList[i]);
   }
}

function printLocaleListBox(){   
   var tokLocCodeList = locList.split(",");
   
   for(i = 0; i < tokLocCodeList.length; i++)
   {
      var tokCodeNameList = tokLocCodeList[i].split(" - ");
      document.writeln("<option value=\"" + tokCodeNameList[0] + "\" selected>");      
      document.writeln(tokCodeNameList[0] + " - " + tokCodeNameList[1]);          
   }  
}


                                                                                     
// done hiding -->                                                                    
</script>                                                                             
</head>                                                                               
<body onLoad="frmLoad('advanced')">                                                             
   <blockquote>                                                                       
      <form>                                                                          
   <b id='voiceh248_tite'>Voice -- H248 高级设置</b><br>                                              
   <br>                                                                               
      <td colspan="4"><font color="red"><span id=voiceh248_tips1''>配置 VoIP 参数, 需要点击</span><b><span id='voiceh248_tips2'>保存</span></b>   
          <span id='voiceh248_tips3'> 按钮来保存参数, 点击 </span><b><span id='voiceh248_tips4'>启动</span></b><span id='voiceh248_tips5'> 后生效</span><br></font></td>                      
   <br>                                                                               
   <br>                                                                               
<table border="0" cellpadding="0" cellspacing="0" ID="Table1">                     
   <tr>
      <td valign="middle" align="center" colspan="2" width="30" height="30">   
      <input type='checkbox' name='vadEnable' ID="Checkbox8" value="1" checked></td>      
      <td colspan="2">                                                                 
     <span id='voiceh248_sadSpt'> 启用vad支持</span></td> 
   </tr>
</table>                                                                           
<table border="0" cellpadding="0" cellspacing="0" ID="Table1">                     
   <tr>
      <td valign="middle" align="center" colspan="2" width="30" height="30">   
      <input type='checkbox' name='echoCancel' ID="Checkbox8" value="1" checked></td>      
      <td colspan="2">                                                                 
     <span id='voiceh248_enbBte'> 启用回声抑制</span></td> 
   </tr>
</table>                                                                           
<br>                                                                                  
  <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
 	  <tr>																			  
 		  <td width="150"><span id='voiceh248_dtmf'>Dtmf传输模式:</span></td>
 		  <td><select name="dtmfRelay" size="1"  onClick='dtmfRelayCbClick(this)' > 
<option value="0" selected>
InBand
<option value="1" >
RFC2833

 		   </select></td>
<td>                                                                        
<div id='rfc2833PT'>                      
   <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
         <tr><td><input type='text' name='rfc2833PT'></td><td id='voiceh248_rng96'>(范围[96,127])</td></tr>            
   </table>
</div>
</td>
 	  </tr>
  </table>
<br>                                                                                  
<div id='messageFormat'>
  <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
 	  <tr>																			  
 		  <td width="150" id='voiceh248_messFor'>消息格式:</td>
 		  <td><select name="messageFormat" size="1" > 
<option value="1" selected>
Short
<option value="0" >
Long
 		   </select></td>
 	  </tr>
  </table>
</div>
<br>                                                                                  
<div id='faxTransMod'>
  <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
 	  <tr>																			  
 		  <td width="150" id='voiceh248_traMode'>传真传输模式:</td>
 		  <td><select name="faxTransMod" size="1" > 
<option value="1" selected>
vbd
<option value="2" >
t38
 		   </select></td>
 	  </tr>
  </table>
</div>
<br>                                                                                  
<div id='faxNegoMod'>
  <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
 	  <tr>																			  
 		  <td width="150" id='voiceh248_trmode'>传真协商模式:</td>
 		  <td><select name="faxNegoMod" size="1" > 
<option value="0" >
auto
<option value="1" selected>
negotiate

 		   </select></td>
 	  </tr>
  </table>
</div>
<br>                                                                                  
<div id='vbdCodec'>
  <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
 	  <tr>																			  
 		  <td width="150" id='voiceh248_deInde'>透传编解码:</td>
 		  <td><select name="vbdCodec" size="1" > 
<option value="1" >
g711mu
<option value="2" selected>
g711a

 		   </select></td>
 	  </tr>
  </table>
</div>
<table border="0" cellpadding="0" cellspacing="0" ID="Table1">                     
   <tr>
      <td valign="middle" align="center" colspan="2" width="30" height="30">   
      <input type='checkbox' name='vbdRed' ID="Checkbox8" value="1" checked></td>      
      <td colspan="2" id='voiceh248_enbRe'>                                                                 
      启用透传时冗余</td> 
   </tr>
</table>                                                                           
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		<td width="150" id='voiceh248_2198'>RFC2198 PT值:</td> 									   
		<td><input type='text' name='rfc2198PT'></td>							
	  <td width="20"> </td>												
	  <td width="300" id='voiceh248_rng127'>(范围[96,127])</td>												
	 </tr>																			 
  </table>
<br>                                                                                  
<div id='digitMapMod'>
  <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
 	  <tr>																			  
 		  <td width="150" id='voiceh248_diMaMode'>数图匹配模式:</td>
 		  <td><select name="digitMapMod" size="1" > 
<option value="0" id='voiceh248_mini'>
最小
<option value="1" selected id='voiceh248_max'>
最大

 		   </select></td>
 	  </tr>
  </table>
</div>
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		<td width="150" id='voiceh248_diStrCou'>数图开始计时器:</td> 									   
		<td><input type='text' name='digitMapStartTimer'></td>							
	  <td width="20"> </td>												
	  <td width="300" id='voiceh248_ran99'>(范围[1,99],单位:秒)</td>												
	 </tr>																			 
  </table>
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		<td width="150" id='voiceh248_digiLonC'>数图长计时器:</td> 									   
		<td><input type='text' name='digitMapLongTimer'></td>							
	  <td width="20"> </td>												
	  <td width="300" id='voiceh248_rang99'>(范围[1,99],单位:秒)</td>												
	 </tr>																			 
  </table>
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		<td width="150" id='voiceh248_digiShorCou'>数图短计时器:</td> 									   
		<td><input type='text' name='digitMapShortTimer'></td>							
	  <td width="20"> </td>												
	  <td width="300" id='voiceh248_r199'>(范围[1,99],单位:秒)</td>												
	 </tr>																			 
  </table>
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		<td width="150" id='voiceh248_sinalPri'>信令优先级:</td> 									   
		<td><input type='text' name='dscpMark'></td>							
	  <td width="20"> </td>												
	  <td width="300" id='voiceh248_ran7'>(范围[0,7])</td>												
	 </tr>																			 
  </table>
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		<td width="150" id='voiceh248_rtp'>RTP优先级:</td> 									   
		<td><input type='text' name='vlanIdMark'></td>								
	  <td width="20"> </td>												
	  <td width="300" id='voiceh248_rang7'>(范围[0,7])</td>												
	 </tr>																			 
  </table>
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0" ID="Table1">
      <tr>                                                                            
          <td width="150" id='voiceh248_jittBu'>Jitter buffer模式:</td>
          <td><select name='jitterBufferMode' size="1">
<option value="0" selected id='voiceh248_dynamic'>
动态
<option value="1" id='voiceh248_static'>
静态
           </select></td>
      </tr>
   </table>
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0">                                 
       <tr>                                                                         
         <td width="150" id='voiceh248_staJit'>静态Jitter buffer设置:</td>  
         <td><input name= 'jitterBuffer' type='text'></td>                                
         <td width="20"> </td>                                   
         <td width="300" id='voiceh248_ran180'>(范围[0,180], 单位:毫秒)</td>                                  
       </tr>                                                                        
   </table>                                                                           
			  <br>																			  
   <table border="0" cellpadding="0" cellspacing="0">                           
	  <tr>																			  
		 <td width="150" id='voiceh248_heartL'>心跳时长:</td>										
		 <td><input type='text' name='heartBeatTime'></td>							 
         <td width="20"> </td>                                                 
         <td width="300" id='voiceh248_ran655'>(范围[5,655],单位:秒)</td>                                                 
	  </tr> 																		  
</table>
			  <br>																			  
   <table border="0" cellpadding="0" cellspacing="0">                           
	  <tr>																			  
		 <td width="150" id='voiceh248_snowSlip'>雪崩:</td>										
		 <td><input type='text' name='snowSlide'></td>							 
         <td width="20"> </td>                                                 
         <td width="300" id='voiceh248_r6000'>(范围[0,6000],单位:秒)</td>                                                 
	  </tr> 																		  
</table>
			  <br>																			  
   <table border="0" cellpadding="0" cellspacing="0">                           
	  <tr>																			  
		 <td width="150" id='voiceh248_proLease'>协议版本:</td>										
		 <td><input type='text' name='mgTopVersion'></td>							 
         <td width="20"> </td>                                                 
         <td width="300" id='voiceh248_ran4'>(范围[1,4])</td>                                                 
	  </tr> 																		  
</table>
<br>                                                                                  
<br>                                                                                  
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		 <td width="150" id='voiceh248_send'>发送增益:</td>
		 <td><select name="ingressGain" size="1" > 
<option value="-14">
-14 dB
<option value="-13">
-13 dB
<option value="-12">
-12 dB
<option value="-11">
-11 dB
<option value="-10">
-10 dB
<option value="-9">
-9 dB
<option value="-8">
-8 dB
<option value="-7">
-7 dB
<option value="-6">
-6 dB
<option value="-5">
-5 dB
<option value="-4">
-4 dB
<option value="-3">
-3 dB
<option value="-2">
-2 dB
<option value="-1">
-1 dB
<option value="0">
0 dB
<option value="1">
1 dB
<option value="2">
2 dB
<option value="3">
3 dB
<option value="4">
4 dB
<option value="5">
5 dB
<option value="6">
6 dB
		  </select></td>
	 </tr>
  </table>
   <table border="0" cellpadding="0" cellspacing="0">                           
	 <tr>																			 
		 <td width="150" id='voiceh248_receive'>接收增益:</td>
		 <td><select name="egressGain" size="1" > 
<option value="-14">
-14 dB
<option value="-13">
-13 dB
<option value="-12">
-12 dB
<option value="-11">
-11 dB
<option value="-10">
-10 dB
<option value="-9">
-9 dB
<option value="-8">
-8 dB
<option value="-7">
-7 dB
<option value="-6">
-6 dB
<option value="-5">
-5 dB
<option value="-4">
-4 dB
<option value="-3">
-3 dB
<option value="-2">
-2 dB
<option value="-1">
-1 dB
<option value="0">
0 dB
<option value="1">
1 dB
<option value="2">
2 dB
<option value="3">
3 dB
<option value="4">
4 dB
<option value="5">
5 dB
<option value="6">
6 dB
		  </select></td>
	 </tr>
</table>
  </tbody>                                                                            
</table>                                                                              
<br>                                                                                  
<center>                                                                              
            <input class="buttonX" type='button' onClick="btnStartH248('advanced')" ID="startH248cBtn" value='启动' disabled=true id='voiceh248_start'>
            <br>
            <br>
            <input class="buttonX" type='button' onClick="btnStopH248('advanced')" ID="stopH248cBtn" value='停止' disabled=true id='voiceh248_pause'>
            <br>
            <br>
            <input class="buttonX" type='button' onClick="btnApplyH248('advanced')" ID="applyH248cBtn" value='保存' disabled=true id='voiceh248_save'>
            <br>
            <br>                                                                               
</center>                                                                             
</form>                                                                               
</blockquote>                                                                         
</body>                                                                               
</html>                                                                               
