﻿// JavaScript Document
function setTab(m,n){
 var tli=document.getElementById("menu"+m).getElementsByTagName("li");
 var mli=document.getElementById("main"+m).getElementsByTagName("ul");
 for(i=0;i<tli.length;i++){
  tli[i].className=i==n?"hover":"";
  mli[i].style.display=i==n?"block":"none";
 }
}




<!-- 
function Show(divid) { 
divid.filters.revealTrans.apply(); 
divid.style.visibility = "visible"; 
divid.filters.revealTrans.play(); 
} 
function Hide(divid) { 
divid.filters.revealTrans.apply(); 
divid.style.visibility = "hidden"; 
divid.filters.revealTrans.play(); 
}

function createAjaxObj()
{
    var xmlHttp=null;
    if(window.XMLHttpRequest)
     {//IEں
         xmlHttp=new XMLHttpRequest();
     }
    else if(window.ActiveXObject)
     {//IEں
        try
         {//IE6.0
             xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         }
        catch(e1)
         {
            try
             {
                 xmlHttp=new ActiveXObject("MSXML2.XMLHTTP");
             }
            catch(e2)
             {
                try
                 {
                     xmlHttp=new ActiveXObject("MSXML3.XMLHTTP");
                 }
                catch(e3)
                 {
                     alert(e3)
                 }
             }
         }
     }
    else
     {//δ֪
         alert("sorry,this page is not unable to distinguish your browser!");
     }
    return xmlHttp;
}

function loads(dd,url)
{
	
	var xmlhttp=createAjaxObj();
	//󣬲ʹescapeusername룬Ա
	
	//alert(url);
	xmlhttp.open("get",url);
	xmlhttp.onreadystatechange=function()
	{
		if(4==xmlhttp.readyState)
		{
			if(200==xmlhttp.status)
			{
				
				if (xmlhttp.responseText!="0")
				{
					//document.getElementById("").innerHTML="";
					str=xmlhttp.responseText;//.replace(" ","").replace(" ","");
					//a1=str.split("|");
					document.getElementById(dd).innerHTML=str;					
				}
				
			}
			else
			{
				msg="error!";
				document.getElementById(dd).innerHTML="sorry,the network is too busy !!!!!";	
				//alert(msg);
			}
			/*var ch=document.getElementById("s_username");
			ch.innerHTML="<font color='#ff0000'>"+msg+"</font>";*/	   
		}
	}
/*	document.getElementById(dd).innerHTML='<img src="../image/loading_animation_liferay.gif" width="70" height="10" />';*/
	xmlhttp.send(null);  
	return false;
}

function curlist(){
loads("curlist","curlist.asp");
}
function curplist(htid,hb,hl){
var cf=document.getElementById("cf").value;
if(cf=="yes"){
loads("curplist1","cprlist.asp?htid="+htid+"&cname="+hb+"&cvalue="+hl);
}
loads("curplist2","nprlist.asp?htid="+htid+"&cname="+hb+"&cvalue="+hl);
}

function cur(c){
	htid=document.getElementById("htid").value;
	if(c.selectedIndex!=0){
	cvalue=c.value;
	ctext=c.options[c.selectedIndex].text;
    document.getElementById("hl").innerHTML=" ( "+ctext+"100 = CNY "+(100*cvalue).toFixed(2)+" )";

	}else{
	cvalue=1;
	ctext="CNY";
	document.getElementById("hl").innerHTML="";
	}
	
	curplist(htid,ctext,cvalue);
	
}
