function setPrices()
{
    var p = document.getElementById("user_Cards");
    var c = document.getElementById("user_Prices");
    //alert(p.options.value);
    for(var i=0;i<p.length;i++)       //修改了这几句,这下IE6,firefox都可正常运行了.
    {
        if(p[i].selected==true)
        {
           update_Prices("0",p[i].value,c);
        }
    }
    return ;
}
function update_Prices( CatID1, CatID2, subTypeForm ){
subTypeForm.length=0;
switch(CatID1){
case "-1":
    subTypeForm.options[0]=new Option("请选择充值卡","-1");
    subTypeForm.options[0].selected=true;
    break;
case "0"://中国
    switch ( CatID2 ){
    case "1002":
	//['10','30','50','100'],
    subTypeForm.options[0]=new Option("盛大一卡通10元","10");
    subTypeForm.options[1]=new Option("盛大一卡通30元","30");
    subTypeForm.options[2]=new Option("盛大一卡通50元","50");
    subTypeForm.options[3]=new Option("盛大一卡通100元","100");
    subTypeForm.options[0].selected=true;
    break;
	//['30','60','100','200'],
    case "1005":
    subTypeForm.options[0]=new Option("Q币卡30元","30");
    subTypeForm.options[1]=new Option("Q币卡60元","60");
    subTypeForm.options[2]=new Option("Q币卡100元","100");
    subTypeForm.options[3]=new Option("Q币卡200元","200");
    subTypeForm.options[0].selected=true;
    break;
	//['10','30','50'],
    case "1007":
    subTypeForm.options[0]=new Option("久游一卡通10元","10");
	subTypeForm.options[1]=new Option("久游一卡通30元","30");
	subTypeForm.options[2]=new Option("久游一卡通50元","50");
    subTypeForm.options[0].selected=true;
    break;
    case "1010":
    subTypeForm.options[0]=new Option("网易一卡通15元","15");
    subTypeForm.options[1]=new Option("网易一卡通30元","30");
    subTypeForm.options[0].selected=true;
    break;
	//['15','30','50','100'],
    case "1011":
    subTypeForm.options[0]=new Option("完美一卡通15元","15");
    subTypeForm.options[1]=new Option("完美一卡通30元","30");
    subTypeForm.options[2]=new Option("完美一卡通50元","50");
    subTypeForm.options[3]=new Option("完美一卡通100元","100");
    subTypeForm.options[0].selected=true;
    break;
	//['5','15','40','100'],
	case "1012":
    subTypeForm.options[0]=new Option("搜狐一卡通5元","5");
    subTypeForm.options[1]=new Option("搜狐一卡通15元","15");
    subTypeForm.options[2]=new Option("搜狐一卡通40元","40");
    subTypeForm.options[3]=new Option("搜狐一卡通100元","100");
    subTypeForm.options[0].selected=true;
    break;
	case "1014":
    subTypeForm.options[0]=new Option("魔兽卡15元","15");
    subTypeForm.options[1]=new Option("魔兽卡30元","30");
    subTypeForm.options[0].selected=true;
    break;
    }
}
}

function getComments(){
	var obj2=document.getElementById("user_Cards");   
    var index2=obj2.selectedIndex;   
	 var text=obj2.options[index2].getAttribute("value");
	 
	var obj=document.getElementById("user_Prices");   
    var index=obj.selectedIndex;   
	var text2=obj.options[index].getAttribute("value");   
 	var text3="1";
	
	var obj3=document.getElementById("inum");   
    var index3=obj3.selectedIndex;   
	text3=obj3.options[index3].getAttribute("value");

	var url="http://www.532500.com:8082/sms/CardPrice.aspx?action=getPrice&callback=?";
	var _cardid=text;
	var _cardprice=text2;
	var _num=text3;
	//var _username="sanjer";var _userid="110";
	var data={cardid:_cardid,cardprice:_cardprice,num:_num};
	$.getJSON(url,data,function(backdata){
	 	$("#show_price").html(backdata.cardprice);
		document.getElementById("prices").value=backdata.cardprice;
	});

}