
Number.prototype.toFixed = function(d)
  {
      var s=this+"";if(!d)d=0;
      if(s.indexOf(".")==-1)s+=".";s+=new Array(d+1).join("0");
      if (new RegExp("^(-|\\+)?(\\d+(\\.\\d{0,"+ (d+1) +"})?)\\d*$").test(s))
      {
          var s="0"+ RegExp.$2, pm=RegExp.$1, a=RegExp.$3.length, b=true;
          if (a==d+2){a=s.match(/\d/g); if (parseInt(a[a.length-1])>4)
          {
              for(var i=a.length-2; i>=0; i--) {a[i] = parseInt(a[i])+1;
              if(a[i]==10){a[i]=0; b=i!=1;} else break;}
          }
          s=a.join("").replace(new RegExp("(\\d+)(\\d{"+d+"})\\d$"),"$1.$2");
      }if(b)s=s.substr(1);return (pm+s).replace(/\.$/, "");} return this+"";
}; 

	//Float校验
	function funCheckFloat(strValue){
		var str=strValue;
		if(trim(str)==""){
			return true;
		}
		if(str=="undefined"  || trim(str).match(/^(-?\d+)(\.\d+)?$/g)==null){
			return false;
		}else{
			return true;
		}
	}
	
  	//日期2大于等于日期1，返回true,否则返回false;
	function compareDate(objDate1,objDate2,caption1,caption2){
		if(objDate1.value==null || objDate1.value=="" || objDate2.value==null || objDate2.value==""){
			return true;
		}
		if(trim(objDate1.value) > trim(objDate2.value)){
			alert(caption1+"大于"+caption2+"!");
			return false;
		}
		return true;
	}
	
  //日期小于系统日期,返回true,否则返回false;
  function compareSystemDate(objDate,strCaption){
    if(objDate.value==null || objDate.value==""){
      return true;
    }
    if(objDate.value>getSystemDate()){
      alert(strCaption+"大于系统日期。");
      //objDate.select();
      objDate.focus();
      return false;
    }
    return true;
  }

  //判断是否是数字
  function checkNumeric(strValue){
    var strTemplate="0123456789";
    for(var i=0;i<strValue.length;i++){
      if(strTemplate.indexOf(strValue.substring(i,i+1))==-1){
         return false;
      }
    }
    return true;
  }

  //使全部输入控件都不可编辑
  function setAuthorization(authorization){
    if(authorization=="2"){
      var form=document.forms[0];
      var inputs=document.getElementsByTagName("input");
      for(var intI=0;intI<inputs.length;intI++){
        inputs[intI].disabled=true;
      }
      var selects=document.getElementsByTagName("select");
      for(var intI=0;intI<selects.length;intI++){
        selects[intI].disabled=true;
      }
      var textareaS=document.getElementsByTagName("textarea");
      for(var intI=0;intI<textareaS.length;intI++){
        textareaS[intI].disabled=true;
      }
    }
  }

  function formatFloat(strValue){
    strValue=parseFloat(strValue)+"";
    if(strValue.indexOf(".")!=-1){
      var strTemp=strValue.substring(strValue.indexOf(".")+1,strValue.length);
      if(strTemp.length==1){
        strValue=strValue+"0";
      }
      else if(strTemp.length>2){
        var intFlag=0;
        var strTemp0="";
        var strTemp1="";
        var strTemp2=strValue.substring(0,strValue.indexOf(".")+3);
        var strTemp3=strValue.substring(strValue.indexOf(".")+3,strValue.length);
        var intI=strTemp3.length;
        while(intI){
          strTemp1=strTemp3.substring(intI-1,intI);
          if(intFlag==1){
            strTemp1=parseInt(strTemp1)+1;
          }
          else{
            strTemp1=parseInt(strTemp1);
          }
          if(strTemp1>4){
            intFlag=1;
          }
          else{
            intFlag=0;
            break;
          }
          intI--;
        }
        if(intFlag==1){
          var intJ=strTemp2.length;
          strValue="";
          while(intJ){
            strTemp0=strTemp2.substring(intJ-1,intJ);
            if(strTemp0!="."){
               if(intFlag==1){
                 strTemp0=parseInt(strTemp0)+1;
                 if(strTemp0==10){
                   intFlag=1;
                   strTemp0=0;
                 }
                 else{
                   intFlag=0;
                 }
               }
               strValue=strTemp0+strValue;
            }
            else{
              strValue="."+strValue;
            }
            intJ--;
          }
          if(intFlag==1){
            strValue="1"+strValue
          }
        }
        else{
          strValue=strTemp2;
        }
      }
    }
    else{
      strValue=strValue+".00";
    }
    return strValue;
  }

	//去掉字符串中的所有半角、全角空格
	function trim(inputStr) {
		inputStr = inputStr.toString();
		var strNewValue="";
		for(var i=0;i<inputStr.length;i++) {
			var strTemp=inputStr.substring(i,i+1);
			if(strTemp!=" "&&strTemp!="　"){
				strNewValue=strNewValue+strTemp;
			}
		}
		return strNewValue;
	}
function checkCharacter(str){
	if(trim(str)==""){
		return true;
	}
	if(trim(str).match(/^[\u4E00-\u9FA5]+$/g)==null){
		return false;
	}else{
		return true;
	}
}

function checkEng1(str){
	if(trim(str).match(/^[A-Za-z\,]+$/g)==null){
		return false;
	}else{
		return true;
	}
}

function checkEng(str){

	var halfCharNo = ",";
	var halfChar = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	for(var i=0;i<str.length;i++){
		if (i % 2 == 0)
		{
			if(halfChar.indexOf(str.charAt(i))<0){
				return false;
			}
		}
		else
		{
			if(halfCharNo.indexOf(str.charAt(i))<0){
				return false;
			}
		}
	}
	return true;
}
//ȡ��ϵͳ取得系统日期,返回格式:YYYY-MM-DD
function getSystemDate(){
	var strYear=2004;
	var strMonth=01;
	var strDay=01;
	var date=new Date();
	strYear=date.getYear()+"";
	strMonth=(date.getMonth()+1);
	if(strMonth<10){
		strMonth="0"+strMonth;
	}
	strDay=date.getDate();
	if(strDay<10){
		strDay="0"+strDay;
	}
	return strYear+"-"+strMonth+"-"+strDay;
}
	//ȥ���去掉字符串中的所有绊脚空格
	function trimMac(strValue){
		var strNewValue="";
		for(var i=0;i<strValue.length;i++) {
			var strTemp=strValue.substring(i,i+1);
			if(strTemp!="-"){
			strNewValue=strNewValue+strTemp;
			}
		}
		return strNewValue;
	}
function statDateChk(strDateFrom, strDateTo) {

	if (trim(strDateFrom)=="" || trim(strDateTo)=="") {
		return false;
	}
	if (strDateFrom > strDateTo) {
		
		return true;
	}

	return false;
}

//
function check_text(who,display) {
	if(who.value == "") {
		alert(display);
		who.focus();
		return false;
	}
	return true;
}

//
function isDateString(str) {
	var reg=/^\d{4}-[0-1]?\d{1}-[0-3]?\d{1}$/;
	return reg.test(str);
}

//
function CheckMobile(Mobile) {
    var filter=/^13[0123456789]{1}[0-9]{8}$/;
    if (!filter.test(Mobile)) {
		return false;
	}
    return true;
}

//
function CheckPhone(Phone) {
	var aryAllPhone = Phone.split("/");
	if(aryAllPhone!=undefined){
		for(var i=0;i<aryAllPhone.length;i++){
			var ArryPhone = aryAllPhone[i].split("-")
    		var Len = ArryPhone.length;
    		//2"-"
	    	if (Len > 3)return false;
	    	//ȫΪ
	    	for (var k =0;k <Len;k++) {
	       	if (ArryPhone[k].replace(/\d/gi,"") != "") return false;
	    	}
	    	//"-"ǰ
	    	if ((Len > 1)&&(ArryPhone[0].length <1)) return false;
		}
	}
    return true;
}

//
function CheckEmail(Email) {
   var filter=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
   
   return(new RegExp(filter).test(Email));
}

//
function DateToStr(get_input_date) {
  var get_input_year = get_input_date.getYear();
  var get_input_month = get_input_date.getMonth() + 1;
  var get_input_day = get_input_date.getDate();

  if(get_input_year<1000) {
	get_input_year=1900 + get_input_year;
  }
  if(get_input_month<10) {
	get_input_month="0" + get_input_month;
  }
  if(get_input_day<10) {
	get_input_day="0" + get_input_day;
  }
  var dt = get_input_year + "-" + get_input_month + "-" + get_input_day;
  return dt;
}

//
function RebuildDate(val) {
	var date_array="";
	var get_input_date_str = val;
	var seperate;
	
	if(get_input_date_str == "") {
		return true;
	}
	
	if (get_input_date_str.indexOf("-") != -1) {
		seperate = "-";
	} else if (get_input_date_str.indexOf("/") != -1) {
		seperate = "/";
	} else if (get_input_date_str.indexOf(".") != -1) {
		seperate = ".";
	}
	
	date_array = get_input_date_str.split(seperate);
	
	if(date_array.length != 3) {
		return ""; 
	}
	if(date_array[0].length < 4) {
		return ""; 
	}
	
	date_array[1] = date_array[1] - 1;
	var get_input_date = new Date(date_array[0], date_array[1], date_array[2]);
	var dt = DateToStr(get_input_date);
	return dt;
 }
 

//
function CompareDate(date1, date2) {
	var dt1 = RebuildDate(date1);
	var dt2 = RebuildDate(date2);
	
	if ( dt1 > dt2 ) {
		return (1);
	} else if ( dt1 == dt2 ) {
		return (0); 
	} else {
		return (-1);
	}
}

/*Age dateChk*/
function childChk(birthDate, flyDate, num) {

	var now = new Date();
	
	var res = birthDate.split("-");
	var res2 = flyDate.split("-");
	var year = res2[0];
	var mon  = res2[1];
	var day  = res2[2];
	if (parseInt(year - res[0],10) > parseInt(num,10)) {
		return true;
	}

	if (parseInt(year - res[0],10) == parseInt(num,10)  && parseInt(mon,10) > parseInt(res[1],10)) {
		return true;
	}
	
	if (parseInt(year - res[0],10) == parseInt(num,10) && parseInt(mon,10) == parseInt(res[1],10) && parseInt(day,10) > parseInt(res[2],10)) {
		return true;
	}
}

function isgbkcheck(s) {
	var recflg = "false";
	for (var i=0; i<s.length; i++) {
		if (s.substring(i, i+1) <= "~") {
			recflg = "true";
		}
	}
	
	if (recflg == "true") {
		return true;
	} else {
		return false;
	}
}
function isNotEnstr(s) {
	var recflg = "false";
	for (var i=0; i<s.length; i++) {
		if (!((s.substring(i, i+1) <= "z" && s.substring(i, i+1) >= "a") ||
			(s.substring(i, i+1) <= "Z" && s.substring(i, i+1) >= "A"))) {
			recflg = "true";
		}
	}
	
	if (recflg == "true") {
		return true;
	} else {
		return false;
	}
}	

function GetDayOfWeek(val){
	var date_array="";
	var get_input_date_str = val;
	var seperate;
	
	if(get_input_date_str == "") {
		return true;
	}
	
	if (get_input_date_str.indexOf("-") != -1) {
		seperate = "-";
	} else if (get_input_date_str.indexOf("/") != -1) {
		seperate = "/";
	} else if (get_input_date_str.indexOf(".") != -1) {
		seperate = ".";
	}
	
	date_array = get_input_date_str.split(seperate);
	
	if(date_array.length != 3) {
		return ""; 
	}
	if(date_array[0].length < 4) {
		return ""; 
	}
	
	date_array[1] = date_array[1] - 1;
	var get_input_date = new Date(date_array[0], date_array[1], date_array[2]);
	return get_input_date.getDay();
}
function isLetterOrNum(theInt){
//判断号码是否为数字或字母

	theInt = trim(theInt);
	for(var i=0;i<theInt.length;i++){
	    oneNum=theInt.substring(i,i+1);
        if (!((oneNum>="0"&&oneNum<="9")||(oneNum>="a"&&oneNum<="z")||(oneNum>="A"&&oneNum<="Z")))
          return false;
    }
	return true;
}

function isDate(strDate) {
	var reg = /^(\d{4})-(\d{2})-(\d{2})$/;
    var arr = reg.exec(strDate);
    var year, month, day;

    if (strDate=="") return true;
    if (!reg.test(strDate)&&RegExp.$2<=12&&RegExp.$3<=31)
        return false;

    year = parseInt(strDate.split('-')[0], 10);
    month = parseInt(strDate.split('-')[1], 10);
    day = parseInt(strDate.split('-')[2], 10);

    if (!((1<=month) && (12>=month) && (31>=day) && (1<=day)) )
        return false;
    if ((month<=7) && ((month % 2)==0) && (day>=31))
        return false;
    if ((month>=8) && ((month % 2)==1) && (day>=31))
        return false;

    if (month==2) {
        if ((year%400==0) || ((year%4==0) && (year%100!=0))) {
            //闰年
            if (day>29)
                return false;
        }
        else if (day>28)
            //非闰年

            return false;
    }
    return true;
}

//将传入的价格加人民币符号（￥）和千分撇（,）
function addRMBQFP(strPrice) {
    	strPrice = trim(strPrice);
    	//负数标志
    	var flag = "no";
    	if (strPrice != "") {
	    	if (strPrice.substring(0,1) == "-") {
	    		strPrice = strPrice.substring(1);
	    		flag = "yes";
	    	}
	    	var pointIndex = strPrice.indexOf(".");
	    	var strPriceZ = "";
	    	var strPriceX = "";
	    	if (pointIndex > 0) {
	    		strPriceZ = strPrice.substring(0,pointIndex);
	        	strPriceX = strPrice.substring(pointIndex);
	    	} else {
	    		strPriceZ = strPrice;
	        	strPriceX = "";
	    	}
	    	
	    	if (strPriceZ.length >= 4) {
	    		var qfpNum = (strPriceZ.length - (strPriceZ.length%3)) / 3;
	    		var tempPrice = "";
				for (var i=0; i<qfpNum; i++) {
					tempPrice = "," + strPriceZ.substring(strPriceZ.length-(i+1)*3,strPriceZ.length-i*3) + tempPrice;
				}
				if (strPriceZ.length%3 == 0) {
					tempPrice = trim(tempPrice).substring(1);
				} else {
					tempPrice = strPriceZ.substring(0,strPriceZ.length%3) + tempPrice;
				}
				if (flag == "yes") {
					strPrice = "￥-" + tempPrice + strPriceX;
				} else {
					strPrice = "￥" + tempPrice + strPriceX;
				}
	    	} else {
	    		if (strPrice != "" && strPrice != ".") {
	    			if (flag == "yes") {
	    				strPrice = "￥-" + strPrice;
	    			} else {
	    				strPrice = "￥" + strPrice;
	    			}
	    		}
	    	}
    	}
    	return strPrice;
    }
    
	//将传入的价格加美元符号（$）和千分撇（,）
	function addMYQFP(strPrice) {
    	strPrice = trim(strPrice);
    	strPrice = strPrice.toString();
    	//负数标志
    	var flag = "no";
    	if (strPrice != "") {
	    	if (strPrice.substring(0,1) == "-") {
	    		strPrice = strPrice.substring(1);
	    		flag = "yes";
	    	}
	    	var pointIndex = strPrice.indexOf(".");
	    	var strPriceZ = "";
	    	var strPriceX = "";
	    	if (pointIndex > 0) {
	    		strPriceZ = strPrice.substring(0,pointIndex);
	        	strPriceX = strPrice.substring(pointIndex);
	    	} else {
	    		strPriceZ = strPrice;
	        	strPriceX = "";
	    	}
	    	
	    	if (strPriceZ.length >= 4) {
	    		var qfpNum = (strPriceZ.length - (strPriceZ.length%3)) / 3;
	    		var tempPrice = "";
				for (var i=0; i<qfpNum; i++) {
					tempPrice = "," + strPriceZ.substring(strPriceZ.length-(i+1)*3,strPriceZ.length-i*3) + tempPrice;
				}
				if (strPriceZ.length%3 == 0) {
					tempPrice = trim(tempPrice).substring(1);
				} else {
					tempPrice = strPriceZ.substring(0,strPriceZ.length%3) + tempPrice;
				}
				if (flag == "yes") {
					strPrice = "$-" + tempPrice + strPriceX;
				} else {
					strPrice = "$" + tempPrice + strPriceX;
				}
	    	} else {
	    		if (strPrice != "" && strPrice != ".") {
	    			if (flag == "yes") {
	    				strPrice = "$-" + strPrice;
	    			} else {
	    				strPrice = "$" + strPrice;
	    			}
	    		}
	    	}
    	}
    	return strPrice;
    }
        
	function isValidCredNo(theInt){
		//判断号码是否为数字或字母或_ . ()
		theInt = trim(theInt);
		var strTemp = "._()";
		var oneChar;
		for(var i=0;i<theInt.length;i++){
		    oneChar=theInt.substring(i,i+1);
	        if (!((oneChar>="0"&&oneChar<="9")||(oneChar>="a"&&oneChar<="z")||(oneChar>="A"&&oneChar<="Z")||strTemp.indexOf(oneChar)>=0)){
	          	return false;
	    	}
	    }
		return true;
	}
	
	//日期自动检查、转换
	function checkDate(str){
		str = trim(str);
		if(str.match(/^(\d\d\d\d)(\d\d)(\d\d)$/) ||
			str.match(/^(\d\d\d\d)\/(\d{1,2})\/(\d{1,2})$/) ||
			str.match(/^(\d\d\d\d)-(\d{1,2})-(\d{1,2})$/)){
			var year = RegExp.$1;
	    	var month = RegExp.$2;
	    	var date = RegExp.$3;
	    	
	    	if(month.length < 2){
	    		month = "0" + month;
	    	}
	    	
	    	if(date.length < 2){
	    		date = "0" + date;
	    	}
	    	str = year + "-" + month + "-" + date;
	    	return str;
		}else{
			return "";
		}
	}
	
	//计算美元金额
	function getDollarMoney(strRmbMoney,strDollarRate){
		var strDollarMoney = parseFloat(strRmbMoney)/parseFloat(strDollarRate);
		var iDollarMoney = 0;
		strDollarMoney = strDollarMoney.toString();
		var pointIndex = strDollarMoney.indexOf(".");
    	if (pointIndex > 0) {
    		iDollarMoney = strDollarMoney.substring(0,pointIndex);
    	} else {
    		iDollarMoney = parseInt(strDollarMoney);
    	}
    	var fTemp = parseFloat(parseFloat(strDollarMoney) - parseFloat(iDollarMoney));
    	
    	if(fTemp>0.00000000000001){
    		iDollarMoney++;
    	}
    	return iDollarMoney;
	}
	
	//计算字符串长度
	function checkLength(strTemp){
		 var i,sum;
		 sum=0;
		 for(i=0;i<strTemp.length;i++)
		 {
		  if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))
		   sum=sum+1;
		  else
		   sum=sum+3;
		 }
		 //alert(sum);
		 return sum;
	}
	
	//预订航班重复检查
	function checkSFRepeat (aryDate, aryAirLineId) {
		var strDateAirLine = "";
		var tempDateAirLine = "";
		var i,j;
		if (aryDate.length > 1) {
			for (i =0; i< aryDate.length; i++) {
				strDateAirLine = trim(aryDate[i].value)+trim(aryAirLineId[i].value).toUpperCase();
				for (j =i+1; j< aryDate.length; j++) {
					tempDateAirLine = trim(aryDate[j].value)+trim(aryAirLineId[j].value).toUpperCase();
					if (strDateAirLine == tempDateAirLine) {
						return true;
					}
				}
			}
		}
		return false;
	}
	
	//国内机票计算票价折扣
	function getRound(strPrice1,strPrice2){
		strPrice1 = parseFloat(strPrice1);
		strPrice2 = parseFloat(strPrice2);
		
		var divdata = parseFloat(strPrice1/strPrice2).toFixed(2);
		divdata = parseFloat(divdata*10).toFixed(1);
		var moddata = divdata*10%5;
		if(moddata==4){
			divdata = parseFloat(divdata + 0.1).toFixed(1);
		}else if(moddata==1){
			divdata = parseFloat(divdata - 0.1).toFixed(1);
		}
		return divdata;
	}
	
	//如果输入的身份证，则自动生成生日
	function getBirth(strCardNum){
		var strBirth = "";
		if(strCardNum.length==18){
			strBirth = strCardNum.substring(6,14);
		}else if(strCardNum.length==15){
			strBirth = "19"
			strBirth = strBirth + strCardNum.substring(6,12);
		}
		str = trim(strBirth);
		if(str.match(/^(\d\d\d\d)(\d\d)(\d\d)$/)){			
			var year = RegExp.$1;
	    	var month = RegExp.$2;
	    	var date = RegExp.$3;	    	
	    	str = year + "-" + month + "-" + date;
	    	return str;
		}else{
			return "";
		}
	}
	
	// 检查姓名长度<=28；type:0成人 1儿童 2婴儿
	function checkNameLength(lastName, firstName, type) {
		var regExp = /[\s　]{1,}/g;
		var lName = lastName.replace(regExp, "");
		var fName = LRtrim(firstName).replace(regExp, " ");
		var name = lName + "/" +fName;
		//alert("****"+name+"****"+name.length);
		//成人
		if(type=="0"){
			if (name.length > 29) {
				return false;
			}
		}else if(type=="1"){
		//儿童含" CHD"
			if (name.length > 25) {
				return false;
			}
		}else if(type=="2"){
		//婴儿含" INF"
			if (name.length > 25) {
				return false;
			}
		}else{
			if (name.length > 29) {
				return false;
			}
		}
		return true;
	}
	
	//乘客姓长度<2
	function isLengthTwo(strFirstName){
		if(strFirstName.length<2){
			return true;
		}else{
			return false;
		}
	}
	
	//去字符串前后空格
	function LRtrim(strValue){
		return strValue.replace(/(^\s*)|(\s*$)/g, "");
	}
	//保存 shaolei 查看客户是否还可以预定
		function checkCustomer(customerId,arg){
		   var argString = "actionType=getAmountFlg&customer_id="+customerId;
           var url = "switchdo.do?prefix=/online&page=/customerOverdraftAmount.do";
           var http_request = false;
           //开始初始化XMLHttpRequest对象
		   if(window.XMLHttpRequest) { //Mozilla 浏览器
				http_request = new XMLHttpRequest();
				if (http_request.overrideMimeType) {//设置MiME类别
					http_request.overrideMimeType("text/xml");
				}
		   }else if (window.ActiveXObject) { // IE浏览器
				try {
					http_request = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e) {
					try {
						http_request = new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e) {}
				}
			}
		   if (!http_request) { // 异常，创建对象实例失败
				excepFunc("3");
				return false;
		   }
		   http_request.onreadystatechange =function(){backFun(http_request,"余额不多，请及时充值！","余额不足，不能交易！",arg);};
		   http_request.open("POST", url, true);
		   http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	       http_request.send(argString);
    	   return;
    }
    
    
//客户优惠信息
function changePreferNew() {
	var objPrefer = document.getElementById("preferInfo");
	var objclientName= document.getElementById("clientNameId");
	var comm_ret_rate = document.getElementById("comm_ret_rate");
	var ret_flg = document.getElementById("ret_flg");
				
	objPrefer.innerHTML = "";
	for (var i=0; i<ListPrefer.length; i++) {
		if (ListPrefer[i].agentId == objclientName.value) {
			objPrefer.innerHTML = "标题：<span class='Text12Orange'>"+ListPrefer[i].name + "</span>&nbsp;&nbsp;&nbsp;&nbsp;内容：<span class='Text12Orange'>" +ListPrefer[i].content+"</span>";
			comm_ret_rate.value = ListPrefer[i].comm_ret_rate;
			ret_flg.options[eval(ListPrefer[i].ret_flg)].selected = true;
			break;
		} else {
			objPrefer.innerHTML = "标题：&nbsp;&nbsp;&nbsp;&nbsp;内容：";
			comm_ret_rate.value = "";
			ret_flg.options[0].selected = true;
			
		}
	} 

}

    
//客户优惠信息
function changePreferNewEn() {
	var objPrefer = document.getElementById("preferInfo");
	var objclientName= document.getElementById("clientNameId");
				
	objPrefer.innerHTML = "";
	for (var i=0; i<ListPrefer.length; i++) {
		if (ListPrefer[i].agentId == objclientName.value) {
			objPrefer.innerHTML = "Title：<span class='Text12Orange'>"+ListPrefer[i].name + "</span>&nbsp;&nbsp;&nbsp;&nbsp;Content：<span class='Text12Orange'>" +ListPrefer[i].content+"</span>";
			break;
		} else {
			objPrefer.innerHTML = "Title：&nbsp;&nbsp;&nbsp;&nbsp;Content：";
			
		}
	} 

}
