function x(c,v) {
	if(c=="qtax") {
		jq("#btntax"+v+"0").css("display", "none");
		jq("#btntax"+v+"1").css("display","");
		jq.ajax({
			url: "http://ibe.135131.com/gj/qTax.asp?md5value=" + jq("#flightplane"+v).attr("s0") + "&o=" + v + "&t=" + Math.random(),
			type: "GET",
			timeout: 1000,
			error: function(){},
			success: function(req){
				if(req!="") {
					var arrreq=req.split(",");
					if (arrreq.length == 3) {
						jq("#btntax"+arrreq[2]+"0").css("display", "");
						jq("#btntax"+arrreq[2]+"1").css("display", "none");
						if(arrreq[0]!="0"&&arrreq[0]!="") {
							jq("#tax"+arrreq[2]).html("&yen;"+arrreq[0]);
							jq("#flightplane"+arrreq[2]).attr("tax1", jq("#flightplane"+arrreq[2]).attr("tax1") + arrreq[0]);
							jq("#flightplane"+arrreq[2]).attr("tax2", jq("#flightplane"+arrreq[2]).attr("tax2") + arrreq[1]);
						}else {
							alert("Q税失败，需要客服协助查询。");
							jq("#btntax"+v+"0").css("display","");
							jq("#btntax"+v+"1").css("display","none");
						};
					} else {
						jq("#btntax"+v+"0").css("display","");
						jq("#btntax"+v+"1").css("display","none");
					}
				} else {
					jq("#btntax"+v+"0").css("display","");
					jq("#btntax"+v+"1").css("display","none");
				}
			}
		});
	}else if(c=="qrule") {
		window.open("http://ibe.135131.com/gj/qPolicy.asp?md5value="+jq("#flightplane"+v).attr("s3"),"查看限制条件","height=600, width=600, top=0, left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=n o, status=no");
	}else if(c=="showflight") {
		jq("#flightdata"+v).css("display", (jq("#flightdata"+v).css("display") == "block")?"none":"");
	}else if(c=="submitorder") {
		objform=jq("#flightplane"+v);
		var seg=eval("("+objform.attr("s2").replace(/(~)/g,"\"").replace(/(`)/g,":").replace(/(!)/g,"{").replace(/(\|)/g,"}")+")");
		var segment="";
		var flight_data_data = "";
		if(seg.s.segment.length==undefined) {
			segment=seg.s.segment.dep+"["+seg.s.segment.arr+"["+seg.s.segment.air+"["+seg.s.segment.flightno+"["+seg.s.segment.depairport+"["+seg.s.segment.arrairport+"["+seg.s.segment.depdate+"["+seg.s.segment.arrdate+"["+seg.s.segment.deptime+"["+seg.s.segment.arrtime+"["+seg.s.segment.flytime+"["+seg.s.segment.plane+"["+seg.s.segment.seat+"["+seg.s.segment.stop;																																																																																																																																																																											
			flight_data_data += seg.s.segment.flightno + "_" + seg.s.segment.dep + "_" + seg.s.segment.arr + "_" + seg.s.segment.air + "_" + seg.s.segment.plane + "_" + seg.s.segment.depdate + " " + seg.s.segment.deptime.substring(0,2) + ":" + seg.s.segment.deptime.substring(2) + "_" + seg.s.segment.arrdate + " " + seg.s.segment.arrtime.substring(0,2) + ":" + seg.s.segment.arrtime.substring(2) + "_" + seg.s.segment.flytime + "_" + seg.s.segment.stop + "_" + seg.s.segment.seat + "___" + seg.s.segment.air + "_" + seg.s.segment.depairport + "_" + seg.s.segment.arrairport + "^";																																																																																																																																																																								
		}else {
			for(var i=0;i<seg.s.segment.length;i++) {
				var tmpseg=seg.s.segment[i];
				segment=(segment=="")?tmpseg.dep+"["+tmpseg.arr+"["+tmpseg.air+"["+tmpseg.flightno+"["+tmpseg.depairport+"["+tmpseg.arrairport+"["+tmpseg.depdate+"["+tmpseg.arrdate+"["+tmpseg.deptime+"["+tmpseg.arrtime+"["+tmpseg.flytime+"["+tmpseg.plane+"["+tmpseg.seat+"["+tmpseg.stop:segment+"]"+tmpseg.dep+"["+tmpseg.arr+"["+tmpseg.air+"["+tmpseg.flightno+"["+tmpseg.depairport+"["+tmpseg.arrairport+"["+tmpseg.depdate+"["+tmpseg.arrdate+"["+tmpseg.deptime+"["+tmpseg.arrtime+"["+tmpseg.flytime+"["+tmpseg.plane+"["+tmpseg.seat+"["+tmpseg.stop;			
				flight_data_data += tmpseg.flightno + "_" + tmpseg.dep + "_" + tmpseg.arr + "_" + tmpseg.air + "_" + tmpseg.plane + "_" + tmpseg.depdate + " " + tmpseg.deptime.substring(0, 2) + ":" + tmpseg.deptime.substring(2) + "_" + tmpseg.arrdate + " " + tmpseg.arrtime.substring(0, 2) + ":" + tmpseg.arrtime.substring(2) + "_" + tmpseg.flytime + "_" + tmpseg.stop + "_" + tmpseg.seat + "___" + tmpseg.air + "_" + tmpseg.depairport + "_" + tmpseg.arrairport + "^";																																																																																																																																																																								
			};
		};
		var ft = 0;
		if (jq("#IsTrue").val()=="4") {ft=1;}
		flight_data_data=ft + "@@@" + objform.attr("price") + "@@@" + objform.attr("tax1") + "@@@@@@$" + flight_data_data;
		cookies('Order_flight_data',escape(flight_data_data));
		document.location.href='../Main/login_order_I.asp';
	};
};
jq(document).ready(function(){	
	var ahref=document.getElementsByTagName("a");	
	for(var i=0;i<ahref.length;i++) {
		if(ahref[i].getAttribute("cmd")) {
			ahref[i].onclick=function () {
				x(this.getAttribute("cmd"),this.getAttribute("values"));
			};
		}
	};
	var ipt=document.getElementsByTagName("input");
	for(var i=0;i<ipt.length;i++) {
		if(ipt[i].getAttribute("cmd")) {
			ipt[i].onclick=function () {
				x(this.getAttribute("cmd"),this.getAttribute("values"));
			};
		}
	};
});