/*
function autoResize() 
{ 
	var newHeight;
	if(getOs()=="MSIE")
		newHeight = (document.body.scrollHeight>frameHeight)?document.body.scrollHeight:frameHeight;
	else newHeight = (document.body.offsetHeight>frameHeight)?document.body.offsetHeight:frameHeight;
	try 
	{ 		
		parent.document.all["hall"].style.height=newHeight;
		parent.document.all["center"].style.height=newHeight;
		parent.document.all["container"].style.height=newHeight+((getOs()=="MSIE")?40:35);
	} 
	catch(e){} 
}
*/
var xmlHttp;

function getOs() 
{ 
   var OsObject = ""; 
   if(navigator.userAgent.indexOf("MSIE")>0) { 
   			return "MSIE";
   } 
   if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){ 
        return "Firefox"; 
   } 
   if(isSafari=navigator.userAgent.indexOf("Safari")>0) { 
        return "Safari"; 
   }  
   if(isCamino=navigator.userAgent.indexOf("Camino")>0){ 
        return "Camino"; 
   } 
   if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){ 
        return "Mozilla"; 
   }    
}
function isOsIE6()
{
		if(window.XMLHttpRequest)
			return false;
		else return true; 
}
/*
* add product to cart xys 2008-4-11
*/
function addtocart(id)
{
    var allcookies = document.cookie;
    var pos = allcookies.indexOf("mycart=");
    
    var value;
    
    if (pos!=-1) {
        var start = pos + 7;
        var end = allcookies.indexOf(";", start);
        if (end == -1) end = allcookies.length;
        value = allcookies.substring(start, end);
        value = decodeURIComponent(value);
    }
    if(typeof(value)!='undefined') value+=",";
    else value=""
    nextyear = new Date();
    nextyear.setFullYear(nextyear.getFullYear( ) + 1);
    document.cookie = "mycart="+encodeURIComponent(value+id.toString())
                    + ";expires="+nextyear.toGMTString();
        
    alert("已放入购物车！");
}

/*
* get to cart
*/
function getcart()
{
	location.herf="/user/shoppingcart";
}

/*
* 弹出式半透明对话框 Like 2008-4-14
* @param divId 对话框id
* @param source 内容HTML
* @param width 宽
* @param height 高
* @param noCloseButton 不显示关闭按钮
*/
function createCenterOperate(divId, source, closeButton)
{
	newDiv = document.createElement("DIV");
	newDiv.id = divId;
	newDiv.className = "centerOperate";
	//newDiv.innerHTML =  "<div style=\"height:10px;line-height:10px;font-size:14px;text-align:right;background:#4e2505;\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate('"+divId+"');return false;\">×</a></div>";	
	//newDiv.innerHTML += "<div>"+source+"</div>";
	//if(!noCloseButton)
	//{
	//	newDiv.innerHTML += "<div style=\"height:16px;line-height:16px;text-align:center;background:#4e2505;padding-top:2px;\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate('"+divId+"');return false;\">关闭窗口</a></div>";	
	//}
	var divHtml = "<table cellspacing='0' cellpadding='0' border='0'>";
	//divHtml += "<tr><td class=\"title\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate('"+divId+"');return false;\">×</a></td></tr>";
	divHtml += "<tr><td>"+source+"</td></tr>";
	if(closeButton)
		divHtml += "<tr><td style=\"closeButton\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate('"+divId+"');return false;\">关闭窗口</a></td></tr></table>";
	newDiv.innerHTML = divHtml;
	document.body.appendChild(newDiv);
	width = newDiv.offsetWidth;
	height = newDiv.offsetHeight;
	newDiv.style.width = (width - 2) + "px";
	newDiv.style.height = (height -2) + "px";
	if(document.documentElement.clientWidth)
	{
		newDiv.style.left = (document.documentElement.clientWidth - width) / 2 + "px";
		newDiv.style.top = (document.documentElement.clientHeight - height) / 2 + "px";
	}
	else
	{
		newDiv.style.left = (document.body.clientWidth - width) / 2 + "px";
		newDiv.style.top = (document.body.clientHeight - height) / 2 + "px";
		newDiv.style.width = width + "px";
	}
	newDiv.innerHTML +="";
	return newDiv;
}
function createTransBlock()
{
	newDiv = document.createElement("DIV");
	newDiv.id = "transBlock";
	newDiv.style.width = document.documentElement.clientWidth+"px";
	newDiv.style.height = document.documentElement.clientHeight+"px";
	document.body.appendChild(newDiv);
	return newDiv;
}
/*
* 弹出式半透明对话框 Like 2008-4-14
* @param divId 对话框id
* @param source 内容HTML
* @param showClose 显示关闭按钮
*/
function showCenterOperate(divId, source, showClose)
{
	centerOp = createCenterOperate(divId, source, showClose);
	centerOp.style.display = "";

	var transBlock = document.getElementById("transBlock");
	if(!transBlock)	transBlock = createTransBlock();
	transBlock.style.display = "";

	hideFlashs(true);		
}
function hideCenterOperate(divId)
{	
	var centerOp = document.getElementById(divId);
	var transBlock = document.getElementById("transBlock");	
	document.body.removeChild(centerOp);
	transBlock.style.display = "none";

	hideFlashs(false);
	window.onscroll = function(){return true;}
}
function hideFlashs(yesorno)
{
	var embeds = document.getElementsByTagName("embed");
	if(yesorno)
		for(var i=0; i<embeds.length; i++)
		{
			var visi = 'visible';
			embeds[i].setAttribute('defaultVisi', visi);
			embeds[i].style.visibility = "hidden";
		}
	else
		for(var i=0; i<embeds.length; i++)
		{
			if(embeds[i].getAttribute('defaultVisi'))
				embeds[i].style.visibility = embeds[i].getAttribute('defaultVisi');
		}				
}
function resizeCenterOperate(innerWidth,innerHeight)
{
	var divs = document.getElementsByTagName("div");
	for (var i = 0; i < divs.length; i++)
	{
		if (divs[i].className == "centerOperate")
		{
			width = innerWidth + 2;
			height = innerHeight + 12;
			divs[i].style.width = (width - 2) + "px";
			divs[i].style.height = (height -2) + "px";
			if(document.documentElement.clientWidth)
			{
				divs[i].style.left = (document.documentElement.clientWidth - width) / 2 + "px";
				divs[i].style.top = (document.documentElement.clientHeight - height) / 2 + "px";
			}
			else
			{
				divs[i].style.left = (document.body.clientWidth - width) / 2 + "px";
				divs[i].style.top = (document.body.clientHeight - height) / 2 + "px";
				divs[i].style.width = width + "px";
			}
			if(isOsIE6())
			{
				//alert(document.documentElement.scrollTop +' '+ window.screen.availHeight)
				//alert(document.documentElement.scrollTop + window.screen.availHeight/2)
				divs[i].style.top = (document.documentElement.scrollTop + window.screen.availHeight/2 - width/2) + "px";
				//var xx = document.documentElement.scrollTop;
				//window.onscroll = function(){document.documentElement.scrollTop = xx;};
				var centerOp = divs[i];
				window.onscroll = function(){centerOp.style.top = (document.documentElement.scrollTop + window.screen.availHeight/2 - width/2) + "px";}
			}
			
			var iframes = divs[i].getElementsByTagName("iframe");
			if(iframes[0])
			{
				iframes[0].width = innerWidth;
				iframes[0].height = innerHeight;
			}
		}
	}
}

function resizeCenterOperate1(innerWidth,innerHeight)
{
	var divs = document.getElementsByTagName("div");
	for (var i = 0; i < divs.length; i++)
	{
		if (divs[i].className == "centerOperate1")
		{
			width = innerWidth + 2;
			height = innerHeight + 12;
			divs[i].style.width = (width - 2) + "px";
			divs[i].style.height = (height -2) + "px";
			if(document.documentElement.clientWidth)
			{
				divs[i].style.left = (document.documentElement.clientWidth - width) / 2 + "px";
				divs[i].style.top = (document.documentElement.clientHeight - height) / 2 + "px";
			}
			else
			{
				divs[i].style.left = (document.body.clientWidth - width) / 2 + "px";
				divs[i].style.top = (document.body.clientHeight - height) / 2 + "px";
				divs[i].style.width = width + "px";
			}
			if(isOsIE6())
			{
				//alert(document.documentElement.scrollTop +' '+ window.screen.availHeight)
				//alert(document.documentElement.scrollTop + window.screen.availHeight/2)
				divs[i].style.top = (document.documentElement.scrollTop + window.screen.availHeight/2 - width/2) + "px";
				//var xx = document.documentElement.scrollTop;
				//window.onscroll = function(){document.documentElement.scrollTop = xx;};
				var centerOp = divs[i];
				window.onscroll = function(){centerOp.style.top = (document.documentElement.scrollTop + window.screen.availHeight/2 - width/2) + "px";}
			}
			
			var iframes = divs[i].getElementsByTagName("iframe");
			if(iframes[0])
			{
				iframes[0].width = innerWidth;
				iframes[0].height = innerHeight;
			}
		}
	}
}

function closeCenterOperate()
{
	var divs = document.getElementsByTagName("div");
	for (var i = 0; i < divs.length; i++)
	{
		if (divs[i].className == "centerOperate")
		{
			document.body.removeChild(divs[i]);
		}
	}

	var transBlock = document.getElementById("transBlock");
	if(transBlock)
		transBlock.style.display = "none";

	hideFlashs(false);
}
//去掉字符串中左右两边空字符
String.prototype.trim=function()
{
    var reSpace=/^\s*(.*?)\s*$/;
    return this.replace(reSpace,"$1");
}
//是否email,前面包括范围(数字、字母、-、.)
String.prototype.isEmail=function()
{
    var reEmail=/^[a-zA-Z0-9]+[a-zA-Z0-9_\.]{2,17}@[a-zA-Z0-9][a-zA-Z0-9\-]*\.[a-zA-Z]{1,4}\.?[a-zA-Z]+$/
    return reEmail.test(this);
}

/*
*数据格式化
*
*@Parm num  要格式化的数据
*@Parm decimal 小数点位数
*/
function formatNumber (num, decimal) 
{
	//decimal  - the number of decimals after the digit from 0 to 3
    //-- Returns the passed number as a string in the xxx,xxx.xx format.
   	anynum=eval(num);
   	divider =10;
   	switch(decimal){
		case 0:
			divider =1;
			break;
		case 1:
			divider =10;
			break;
		case 2:
			divider =100;
			break;
		default:  	 //for 3 decimal places
			divider =1000;
		}
	
	   workNum=Math.abs((Math.round(anynum*divider)/divider));
	   workStr=""+workNum
	   if (workStr.indexOf(".")==-1)
		   {
		   		workStr+="."
		   }
	   dStr=workStr.substr(0,workStr.indexOf("."));
	   dNum=dStr-0;
	   pStr=workStr.substr(workStr.indexOf("."));
	   while (pStr.length-1< decimal)
		   {
		   		pStr+="0"
		   }
	   if(pStr =='.') pStr ='';
	   //--- Adds a comma in the thousands place.    
	   if (dNum>=1000) {
		  dLen=dStr.length
		  dStr=parseInt(""+(dNum/1000))+","+dStr.substring(dLen-3,dLen)
	   }
	   //-- Adds a comma in the millions place.
	   if (dNum>=1000000) {
		  dLen=dStr.length
		  dStr=parseInt(""+(dNum/1000000))+","+dStr.substring(dLen-7,dLen)
	   }
	   retval = dStr + pStr
	   //-- Put numbers in parentheses if negative.
	   if (anynum<0) {retval="("+retval+")";}
	  //You could include a dollar sign in the return value.
	  //retval =  "$"+retval
	  
	  return retval;
 }
 
 /*
 *去掉数据的所有逗号
 *
 *@Parm strNum 要操作的数据
 */
 function deleteComma (strNum)
 {
 	do
 	{
 		strNum = strNum.replace(',','');
 	}
 	while(strNum.indexOf(',')!=-1);
	return strNum;
 }

/*add by xys for search*/
function showSearchOperate(varName,varID,varTreecode,varTLevel)
{
	var addressource="<iframe src='/index/search/mname/"+varName+"/mid/"+varID+"/tcode/"+varTreecode+"' frameborder='0' scrolling='no'></iframe>";
	centerOp=createCenterOperate1('searchframe',addressource,0,varID);
	centerOp.style.display="";
	
	/*if(varName=='address')
	{
		
		var addresssource="<iframe src='/index/search/mname/address/mid/"+varID+"/tcode/"+varTreecode+"' frameborder='0' scrolling='no'></iframe>";
		centerOp=createCenterOperate1(varName,addresssource,0);
		centerOp.style.display="";
		//window.open('/index/search','','newwin');
		//window.showModalDialog('/index/search','', 'help:no; status:no;unadorned:yes');
	}
	else if(varName=='CarType')
	{
		var addresssource="<iframe src='/index/search/mname/CarType/mid/"+varID+"/tcode/"+varTreecode+"' frameborder='0' scrolling='no'></iframe>";
		centerOp=createCenterOperate1(varName,addresssource,0);
		centerOp.style.display="";
	}
	else if(varName=='CarModel')
	{
		var addresssource="<iframe src='/index/search/mname/CarModel/mid/"+varID+"/tcode/"+varTreecode+"' frameborder='0' scrolling='no'></iframe>";
		centerOp=createCenterOperate1(varName,addresssource,0);
		centerOp.style.display="";
	}
	else
	{
		var addresssource="<iframe src='/index/search/mname/"+varName+"/mid/"+varID+"' frameborder='0' scrolling='no'></iframe>";
		centerOp=createCenterOperate1(varName,addresssource,0);
		centerOp.style.display="";
	}*/
}

function hidediv(vdiv)
{
	document.getElementById(vdiv).style.display = "none";
}

/*
* 弹出式半透明对话框 Like 2008-4-14
* @param divId 对话框id
* @param source 内容HTML
* @param width 宽
* @param height 高
* @param noCloseButton 不显示关闭按钮
*/
function createCenterOperate1(divId, source, closeButton,varID)
{
	newDiv = document.createElement("DIV");
	newDiv.id = divId;
	newDiv.className = "centerOperate1";	
	var r =  document.getElementById(varID).getBoundingClientRect();
	if(varID!="subaddress1")
		var r1= document.getElementById('searchtable').getBoundingClientRect();
	//newDiv.innerHTML =  "<div style=\"height:10px;line-height:10px;font-size:14px;text-align:right;background:#4e2505;\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate('"+divId+"');return false;\">×</a></div>";	
	//newDiv.innerHTML += "<div>"+source+"</div>";
	//if(!noCloseButton)
	//{
	//	newDiv.innerHTML += "<div style=\"height:16px;line-height:16px;text-align:center;background:#4e2505;padding-top:2px;\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate('"+divId+"');return false;\">关闭窗口</a></div>";	
	//}
	var divHtml = "<table cellspacing='0' cellpadding='0' border='0'style='height:100%'>";
	//divHtml += "<tr><td class=\"title\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate1('"+divId+"');return false;\">×</a></td></tr>";
	divHtml += "<tr><td>"+source+"</td></tr>";
	//if(closeButton)
		//divHtml += "<tr><td style=\"closeButton\"><a style='color:#dc801c;' href='' onclick=\"hideCenterOperate1('"+divId+"');return false;\">关闭窗口</a></td></tr></table>";
	newDiv.innerHTML = divHtml;
	document.body.appendChild(newDiv);
	width = newDiv.offsetWidth;
	height = newDiv.offsetHeight;
	newDiv.style.width = (width - 2) + "px";
	newDiv.style.height = (height -2) + "px";
	if(document.documentElement.clientWidth)
	{
		if(varID=="subaddress1")
			newDiv.style.left=r.right+"px";
		else
			newDiv.style.left = r1.right+"px";		
		newDiv.style.top = r.bottom + "px";
	}
	else
	{
		if(varID=="subaddress1")
			newDiv.style.left=r.right+"px";
		else
			newDiv.style.left = r1.right+"px";		
		newDiv.style.top = r.bottom + "px";
		newDiv.style.width = width + "px";
	}
	if(isOsIE6())
	{
		//alert(document.documentElement.scrollTop +' '+ window.screen.availHeight)
		//alert(document.documentElement.scrollTop + window.screen.availHeight/2)
		newDiv.style.top = (document.documentElement.scrollTop+r.top ) + "px";
		//var xx = document.documentElement.scrollTop;
		//window.onscroll = function(){document.documentElement.scrollTop = xx;};
		var centerOp = newDiv;
		window.onscroll = function(){centerOp.style.top = (document.documentElement.scrollTop + window.screen.availHeight/2 - width/2) + "px";}
	}
	newDiv.innerHTML +="";

	return newDiv;
}

function hideCenterOperate1(divId)
{	
	var centerOp = parent.document.getElementById(divId);	
	parent.document.body.removeChild(centerOp);	
}

function GetValue(vId,vCount)
{
   var vcontrolid=document.getElementById('controlid').value;
   var vcontrolname= document.getElementById('controlname').value;
   var selectvalue='';
   var selectcode='';
   for(var i=0;i<vCount;i++)
	{
	   if(document.getElementById(vId+i).checked==true)
		{
		   selectvalue=document.getElementById(vId+i).value;
		   selectcode=document.getElementById('lastcode'+i).value;
		}
	}   
   selectvalue=document.getElementById('selected').value+selectvalue; 
   if(selectcode=='')
	   selectcode=document.getElementById('selectcode').value;
   if(vcontrolid=='subaddress1')
		parent.document.getElementById(vcontrolid).value=selectvalue;
   else
	{
		parent.document.getElementById(vcontrolid).innerHTML=selectvalue; 
		parent.document.getElementById(vcontrolid+'code').value=selectcode;
	}
   var centerOp = parent.document.getElementById('searchframe');	
   parent.document.body.removeChild(centerOp);   
}

function GetSubT(varTreecode)
{
   var controlid=document.getElementById("controlid").value;
   var controlname =document.getElementById("controlname").value;  
   window.open("/index/search/mid/"+controlid+"/mname/"+controlname+"/tcode/"+varTreecode,"_self","");
}

function GetPreCode(varTreecode)
{
   var controlid=document.getElementById("controlid").value;
   var controlname =document.getElementById("controlname").value;  
   window.open("/index/search/mid/"+controlid+"/mname/"+controlname+"/tprecode/"+varTreecode,"_self","");
}


function SetCityValue(vCode)
{
	document.getElementById("searchcondition").innerHTML=document.getElementById("searchcondition").innerHTML+vCode;
}

function createXMLHttpRequest() 
{
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
} 

function addSelect(sid,elementID,defvalue) 
{			
	oElement=document.getElementById(elementID);
	oElement.disabled ='';
	createXMLHttpRequest();
	var url = "/index/select/sid/" + sid+"/defv/"+defvalue;	
	xmlHttp.onreadystatechange = function(){onStateChange(elementID)};
	xmlHttp.open("GET", url, true);
	xmlHttp.send(null);
}
/*多选框和单选框多层结构*/
function SetCheckCode(vid,vcount,vlevel,spt)
{
	
   var objtext = document.getElementById(vid);
   var textvalue='';
   for (var i=1;i<vlevel;i++)
   {
	   var oselect = document.getElementById('sub'+vid+(parseInt(i)+1));
	   oselect.options.length = 1;
   }
  var checkvalue="";
  
  for(var i=0;i<vcount;i++)
  {  
     var obj=document.getElementById(vid+i);
     if(obj.checked==true)
     {
	    checkvalue=obj.value;
	    if (textvalue=='')
	       textvalue=checkvalue;
	    else
	       textvalue+='|'+textvalue;   
	    if(vlevel>1)  addSelect(checkvalue,'sub'+vid+'2');
     }
  } 
  objtext.value=vid+spt+textvalue; 
}

/*
spt:分隔符
第一层为select和多层除第一层外的按钮事件   
*/
function GetNextSelect(vid,vcount,vlevel,spt)
{   
	
   var obj = document.getElementById('sub'+vid+vcount);  
   var selectvalue= obj.value; 
   //把选择的值添加到text框
   var objtext = document.getElementById(vid);
   objtext.value=vid+spt+selectvalue;
   //-----------------------------------------
   for (var i=vcount;i<vlevel;i++)
   {
   	   
	   var oselect = document.getElementById('sub'+vid+(parseInt(i)+1));
	   oselect.options.length = 1;   
   }
   addSelect(selectvalue,'sub'+vid+(parseInt(vcount)+1));
}

function GetFastNextSelect(vid,vcount,vlevel)
{   
	
   var obj = document.getElementById('sub'+vid+vcount);  
   var selectvalue= obj.value;    
   for (var i=vcount;i<vlevel-1;i++)
   {
   	   
	   var oselect = document.getElementById('sub'+vid+(parseInt(i)+1));
	   oselect.options.length = 1;   
   }
   addSelect(selectvalue,'sub'+vid+(parseInt(vcount)+1));
}

function onStateChange(oElement)
{
    if(xmlHttp.readyState == 4)
	{
        if(xmlHttp.status == 200)
		{	  
		   var obj = document.getElementById(oElement); 
           eval(xmlHttp.responseText);
		   if(oElement=='carmodel')
			   addSelect(document.getElementById(oElement).value,'carsubmodel','CarSubModel')
        }
    }
}

/*显示广告*/
function ShowContent(adarea,adlink,adid)
{	
	//var source=document.getElementById('imglink').value;	
		
	if(adarea==1)
	{
		window.open(adlink);
	}
	else
	{
		window.open("/company/adverdetail/adid/"+adid);
		//rmObj.action='';
	}

	
}
/*
添加当前值到textbook
*/
function addvalue(vid,vcount,spt)
{
	var obj = document.getElementById('sub'+vid+vcount);  
    var selectvalue= obj.value; 
    //把选择的值添加到text框
    var objtext = document.getElementById(vid);
    objtext.value=vid+spt+selectvalue;
}
/*
当前属性为颜色类时添加当前值到textbook
*/
function showcolor(vid,vcount,spt)
{
	var obj = document.getElementById('sub'+vid+vcount);  
    var selectvalue= obj.value; 
    var colvalue=selectvalue.split('|');
    //把选择的值添加到text框
    var objtext = document.getElementById(vid);
    objtext.value=vid+spt+colvalue[0];
    var objcolor=document.getElementById(vid+'n');
    if (colvalue[1]) objcolor.style.background=colvalue[1];
    else objcolor.style.background="#fff";
}

function resizeSearchOperate1(innerWidth,innerHeight,vid)
{
	
	var divs = document.getElementsByTagName("div");	
	var r =   document.getElementById(vid).getBoundingClientRect();	
	if(vid!="subaddress1")
		var r1= document.getElementById('searchtable').getBoundingClientRect();
	for (var i = 0; i < divs.length; i++)
	{
		if (divs[i].className == "centerOperate1")
		{			
			width = innerWidth ;
			height = innerHeight;
			divs[i].style.width = (width ) + "px";
			divs[i].style.height = (height ) + "px";
			if(document.documentElement.clientWidth)
			{
				if(vid=="subaddress1")
					divs[i].style.left=r.right+"px";
				else
					divs[i].style.left = r1.right+"px";
				divs[i].style.top = r.bottom + "px";
			}
			else
			{
				if(vid="subaddress1")
					divs[i].style.left=r.right+"px";
				else
					divs[i].style.left = r1.right+"px";;
				divs[i].style.left = "258px";
				divs[i].style.top = r.bottom + "px";
				divs[i].style.width = width + "px";
			}
			if(isOsIE6())
			{
				//alert(document.documentElement.scrollTop +' '+ window.screen.availHeight)
				//alert(document.documentElement.scrollTop + window.screen.availHeight/2)
				divs[i].style.top = (document.documentElement.scrollTop+r.top ) + "px";
				//var xx = document.documentElement.scrollTop;
				//window.onscroll = function(){document.documentElement.scrollTop = xx;};
				var centerOp = divs[i];
				window.onscroll = function(){centerOp.style.top = (document.documentElement.scrollTop + window.screen.availHeight/2 - width/2) + "px";}
			}
			
			var iframes = divs[i].getElementsByTagName("iframe");
			if(iframes[0])
			{
				iframes[0].width = innerWidth;
				iframes[0].height = innerHeight;
			}
		}
	}
}
//刷新语言设置
function Reflshlanglog(logs) 
{			
	createXMLHttpRequest();
	var url = "/index/langlog/logs/"+logs;	
	xmlHttp.open("POST", url,true);
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlHttp.send("/logs="+logs);
}

