// JavaScript Document/*显示隐藏层*/
function P_ListNone(LayerName)
{
	$(LayerName).style.display = "none";
}
function P_List(LayerName)
{
	//alert(LayerName);
	$(LayerName).style.display = "";
}
function P_SetDivScreen(DivID)
{
	var hA =$(DivID);
	//hA.style.width = window.screen.availWidth-20; //得到宽度 
	var s_height=document.body.scrollHeight + 20; 
	if(s_height<window.screen.availHeight) 
	{ 
	s_height=window.screen.availHeight + 20; 
	} 
	hA.style.height=s_height+"px"//设置高度
}
function newbox_iestyle(DivID){
	var newbox = $(DivID);
newbox.style.marginTop = document.documentElement.scrollTop - newbox.offsetHeight / 2 + "px";
//newbox.style.marginLeft = document.documentElement.scrollLeft - newbox.offsetWidth / 2  + 200 + "px";
}
function showid(idname){
var isIE = (document.all) ? true : false;
var isIE6 = isIE && ([/MSIE (\d)\.0/i.exec(navigator.userAgent)][0][1] == 6);
var newbox=$(idname);
newbox.style.zIndex="9999";
newbox.style.display="block"
newbox.style.position = !isIE6 ? "fixed" : "absolute";
newbox.style.top =newbox.style.left = "50%";
newbox.style.marginTop = - newbox.offsetHeight / 2 + "px";
newbox.style.marginLeft = - newbox.offsetWidth / 2 + "px"; 
newbox.style.display = "";
}

function $(getID)
{
    return document.getElementById(getID);
}
//	居中层
function floatdiv(DivID)
{
	//$(DivID).style.left=(document.body.offsetWidth-$(DivID).offsetWidth)/2+document.body.scrollLeft;
	//alert("OK");
	var Hid = 0;
	if($(DivID).style.display == "none")
	{
		Hid = 1;
		$(DivID).style.display = ""
	}
	var W = $(DivID).clientWidth||$(DivID).offsetWidth;
	var getW =(document.body.offsetWidth-W)/2+document.body.scrollLeft;
	$(DivID).style.left = getW;
	if(Hid == 1)
		$(DivID).style.display = "none";
}

function floatdiv2(DivID) 
{ 
with(document.getElementsById(DivID)[0].style) 
{ 
left = (document.body.offsetWidth-parseInt(width))/2 - 1000;
top = (document.body.offsetHeight-parseInt(height))/2 ;
} 
} 
function P_WinLoad()
{
	window.onload=floatdiv;
	window.onscroll=floatdiv;
}
//	窗口最大化
function P_Maxscreen()
{
	self.resizeTo(screen.availwidth,screen.availheight);
	self.moveTo(0,0);
	window.focus();
	//((document.documentElement.clientHeight==0)?document.body.clientHeight:document.documentElement.clientHeight);
}


//？提示
function ShowDivCity(DivCityID)
{
    $(DivCityID).style.display= "block";
}

function HiddenDivCity(DivCityID)
{
    $(DivCityID).style.display = "none";
}
//锚记链接
function L_JumpTop(TopID)
{
	//$(TopID).focus();
	TopID = "#" + TopID;
	window.open(TopID,"_self");
	}
function L_JumpTop(TopID,getLink)
{
	//$(TopID).focus();
	TopID = "#" + TopID;
	window.open(TopID,"_self");
	var getUrl = getLink.href;
	var getD = new Date();
	if(getUrl.indexOf("?") > 0 )
	{
		getUrl = getUrl + "&L_time=" + getD.getMilliseconds();	
	}
	else
	{
		getUrl = getUrl + "?L_time=" + 	getD.getMilliseconds();	
	}
	//window.open(getUrl,getLink.target);
	}
function L_JumpTops(TopID,getUrl,Target)
{
	//$(TopID).focus();
	TopID = "#" + TopID;
	window.open(TopID,"_self");
	var getD = new Date();
	if(getUrl.indexOf("?") > 0 )
	{
		getUrl = getUrl + "&L_time=" + getD.getMilliseconds();	
	}
	else
	{
		getUrl = getUrl + "?L_time=" + 	getD.getMilliseconds();	
	}
	//window.open(getUrl,Target);
	}
function P_ChaneWebNote()
{
	if($("L_ChangeWeb") == undefined )
	 return;
	
	
	var getNote = $("L_ChangeWeb").innerHTML;
	if( getNote == "" )
	{
		getNote = P_RootPath() + "/ChangeWeb.html";
		getNote = AjaxSend(getNote);
		$("L_ChangeWeb").innerHTML = getNote;
	}
}
function P_ChaneAlimamaNote()
{
	if($("alimama_div") == undefined )
	 return;
	
	
	var getNote = $("alimama_div").innerHTML;
	alert(getNote);
	if( getNote == "" )
	{
		getNote = P_RootPath() + "/alimama.html";
		getNote = AjaxSend(getNote);
		$("alimama_div").innerHTML = getNote;
	}
}
function P_RootPath()
{
    var RootPath = "/";
    var getUrl = location.href;
    if( getUrl.indexOf("/tao123") > 0 )
        RootPath = RootPath + "tao123/";
    return RootPath;
}
function P_weatherGet()
{
 var url = "http://m.weather.com.cn/m/pn3/weather.htm";
 url = AjaxSend(url);
 $("topbarleft").innerHTML = url;
}




