String.prototype.replaceAll = function(s1,s2) {
    return this.replace(new RegExp(s1,"gm"),s2);
}
var orderid,ordertit
$(document).ready(function(){
	cc();
	$("#mask").css("opacity","0.4");
	$("#usubmit").click(function(){
		$("#mask").css({"height":"0px","display":"none"});
		$("#uorder").animate({"left":"0px"});
		$("#uorder").css({"display":"none"});
		ajax_send();
	});
	$("#cls").click(function(){
		$("#mask").css({"height":"0px","display":"none"});
		$("#uorder").animate({"left":"0px"});
		$("#uorder").css({"display":"none"});
	});
	if($.browser.msie){
		if( $.browser.version=="6.0" ){
			/*
			$(".center").css({"width":"525px","overflow":"hidden"});
			$(".c_box1").css({"width":"519px"});
			$(".c_body").css({"width":"525px"});
			$(".c_boxtit").css({"width":"518px"});
			$(".c_box1 dd").css({"width":"245px"});
			$(".userface").css({"width":"60px"});
			$("#search").css({"width":"518px","overflow":"hidden"});
			$(".picview").css({"width":"300px"});
			*/
			$(".left").css({"width":"162px","overflow":"hidden"});
			$(".body").css({"padding":"0px"});
			$(".l_body").css({"width":"160px","overflow":"hidden"});
			$(".l_body img").css({"margin":"4px 0"});
			$(".infolist").css({"width":"340px","overflow":"hidden"});
			$(".fnews").css({"width":"650px"});
                        $(".fnews li").css({"width":"310px"});
			$(".r_body dd a").each(function(){$(this).attr("href",function(){return encodeURI($(this).attr("href"));});});
			
			//$("#submenu").html("6");
			$("#submenu li").css({"marginLeft":"-20px","paddingLeft":"0px"});
		}else if( $.browser.version=="7.0" ){
			//$("#submenu").html("7");
			$("#submenu li").css({"marginLeft":"-20px","paddingLeft":"0px"});
		}else if( $.browser.version=="8.0" ){
			//$("#submenu").html("8");
			//$("#submenu li").css({"paddingLeft":"10px";"width":"80px"});
			$("#submenu li").css("paddingLeft","0px");
		}//$("#submenu").html("9");
		
	}else{
	}


});

function cc()   
{   
var i=$("#stype").val();   
switch(i)
{
	case "days":$('#search-keyword').animate({'width':'70px'});$('#search-keyword').val('1');$('#q2').val('5');$("#sunit1").html("日 至");$("#sunit2").html("日");break;
	case "price":$('#search-keyword').animate({'width':'70px'});$('#search-keyword').val('100');$('#q2').val('1000');$("#sunit1").html("元 至");$("#sunit2").html("元");break;
	default:$('#search-keyword').animate({'width':'200px'});$('#search-keyword').val('在这里搜索...');$(".sunit").html("");break;
}
} 

	function CheckLogin(){
	  var taget_obj = document.getElementById('_userlogin');
	  myajax = new DedeAjax(taget_obj,false,false,'','','');
	  myajax.SendGet2("/member/ajax_loginsta.php");
	  DedeXHTTP = null;
	}
function corder(tit,id){
	var spoint=$(document).height()/2-100;
	$("#mask").css({"height":$(document).height(),"display":"block"});
	$("#uorder").css({"display":"block"});
	$("#uorder").animate({"left":spoint+"px"});
	orderid=id;
	ordertit=tit;
}


