
(function () {
	function atrand(num) {
		return Math.floor(Math.random() * num) + 1;
	}
	var P = location.pathname;
	if ((parent && parent.location == self.location) || P.indexOf("/list_forum") != -1 || P.indexOf("/theme/info/info") != -1) {
		var R = escape(document.referrer);
		document.write("<img src=\"http://www.atpanel.com/1.gif?cache=" + atrand(9999999) + "&pre=" + R + "&category=&userid=&channel=112&ad_id=\" width=\"0\" height=\"0\" style=\"display:none;\" />");
	}
})();

var lastDisplayTbodyId;
function showAllPrice(mainId){
    var mainBody = $(mainId);
    var allPriceBodyId = mainId.replace('HBMain', 'HBAllPrice');
    var allPriceBody = $(allPriceBodyId);
    if (lastDisplayTbodyId == allPriceBodyId) {
        if (allPriceBody.style.display != 'none') {
            allPriceBody.style.display = 'none';
            return;
        }
    } else {
        if (lastDisplayTbodyId) {
            $(lastDisplayTbodyId).style.display = 'none';
		}
    }

    allPriceBody.style.display = '';
    var pos = YAHOO.util.Dom.getXY(allPriceBody);
    window.scrollTo(0, pos[1]-70);
    lastDisplayTbodyId = allPriceBodyId;
}


function changeSort(sortType){
    document.getElementById('et:sortType').value = sortType;

    //document.SearchTickets.submit();
	document.getElementById('et:fssb').click();
}


function chooseSeller(flightIds,cabinIds,cabinTypes,supplySpIds,spIds,supplyIds,supplyCityIds,cityIds,spType){
    document.SearchTickets.action = "http://jipiao.taobao.com/select_seller.htm";

		document.getElementById('flightIds').value = flightIds;
	document.getElementById('cabinIds').value = cabinIds;
	document.getElementById('cabinTypes').value = cabinTypes;
	
	
	document.getElementById('supplySpIds').value = supplySpIds;
	//document.getElementById('spIds').value = spIds;
	//document.getElementById('supplyIds').value = supplyIds;
	document.getElementById('supplyCityIds').value = supplyCityIds;
	//document.getElementById('cityIds').value = cityIds;
	document.getElementById('spType').value = spType;

	//document.SearchTickets.submit();
	document.getElementById('et:fssb').click();
}


