var w = 90;
var h = 150;
var str = "";
var obj = document.getElementById("divStayTopLeft");
if (obj)str = obj.innerHTML;
if( typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat'){
document.writeln('<DIV  style="z-index:9;right:0;bottom:0;height:'+h+'px;width:'+w+'px;overflow:hidden;POSITION:fixed;_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop);">');
}
else {
document.writeln('<DIV  style="z-index:9;right:0;bottom:0;height:'+h+'px;width:'+w+'px;overflow:hidden;POSITION:fixed;*position:absolute; *top:expression(eval(document.body.scrollTop)+eval(document.body.clientHeight)-this.style.pixelHeight);">');
}
document.writeln('<div style="clear:both;margin:auto;height:50px;font-size:16px;overflow:hidden;font-weight:bold;text-align:left;"><a href="javascript:scroll(0,0)" hidefocus="true"><img src="/images/atop.gif" alt="回到顶部" style="border: 0px;" /></a></div> ');
document.write('<div style="clear:both;margin:auto;overflow:hidden;text-align:left;">'+str+'</div>');
document.writeln('</DIV>');



function s(id,title){document.CitySearch.TID.value=id;document.CitySearch.BQName.value=title;ShowHiddenCityList();return false}

function ShowHiddenCityList(){var a=document.getElementById("divCityList");if(a.style.display!="none"){a.style.display="none"}else{a.style.display="block"}}

function StopPropagation(a){if(!a)a=window.event;if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true}

function ShowHiddenMessTopList(){var a=document.getElementById("Mess_Top_List");if(a.style.display!="none"){a.style.display="none"}else{a.style.display="block"}}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}




function setGUserTab(name,cursel,n){
for(i=0;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("News_"+name+"_"+i);
//var me=document.getElementById("con_menu_"+i);
menu.className=i==cursel?"UserTopMenuC":"UserTopMenuD";
con.style.display=i==cursel?"block":"none";
//me.style.display=i==cursel?"block":"none";
}
}


function setMessTopTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("Mess_"+name+i);
menu.className=i==cursel?"Mess_Top_Menu1":"Mess_Top_Menu2";
con.style.display=i==cursel?"block":"none";
}
}


function setMessTopListTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("Mess_"+name+i);
menu.innerHTML=i==cursel?"<FONT face=webdings>6</FONT>":"<FONT face=webdings>4</FONT>";
con.style.display=i==cursel?"block":"none";
}
}



function showDiv(tag){
var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');

light.style.display='block';
Iframe.style.display='block';
fade.style.display='block';

}
function hideDiv(tag){
var light=document.getElementById(tag);
var fade=document.getElementById('bg');
var Iframe=document.getElementById('popIframe');
light.style.display='none';
Iframe.style.display='none';
fade.style.display='none';

}   
   

function openEg(url,width,height,left,top){
 var temp = "channelmode=no,location=no,menubar=no,toolbar=no,directories=no,scrollbars=no,resizable=no";
 if (width) {
  temp += ',width=' + width;
 } else {
  width = 0;
 }
 if (height) {
  temp += ',height=' + height;
 } else {
  height = 0;
 }
 if (left) {
  temp += ',left=' + left;
 } else {
  temp += ',left='
    + Math.round((window.screen.width - parseInt(width)) / 2);
 }
 if (top) {
  temp += ',top=' + top;
 } else {
  temp += ',top='
    + Math.round((window.screen.height - parseInt(height)) / 2);
 }
   window.open(url, '_blank', temp);
}




function UPshown(name,block,n)
{
	for(i=1; i<=n; i++)
	{
		if(document.getElementById(name + i) == null)
		{    
			var stop1 = 1;
		}
	}
	if(stop1 == null)  //待所有div都下载完再执行
	{
	
		for(i=1; i<=n; i++)
	
		{
	
			 document.getElementById("M_"+name+"_"+i).style.display = 'none';
			 document.getElementById(name + i).className = name +"-"+ i +"-hover";
	
		}
	
		document.getElementById("M_"+name+"_"+block).style.display = 'block';
		document.getElementById(name + block).className = name +"-"+ block;
	}
}


function Editshown(name,block,n)
{
	for(i=1; i<=n; i++)
	{
		if(document.getElementById(name + i) == null)
		{    
			var stop1 = 1;
		}
	}
	if(stop1 == null)  //待所有div都下载完再执行
	{
	
		for(i=1; i<=n; i++)
	
		{
			 document.getElementById("M_"+name+"_"+i).style.display = 'none';
			 document.getElementById(name + i).className = "UserAddlink-box-edit-bg";
		}
		document.getElementById("M_"+name+"_"+block).style.display = 'block';
		document.getElementById(name + block).className = "UserAddlink-box-edit-bg-hover";
	}
}

function HideEditshown(name,block){
document.getElementById("M_"+name+"_"+block).style.display='none';
document.getElementById(name + block).className = "UserAddlink-box-edit-bg";
}


function reinitIframe(id) {
        var iframe = document.getElementById(id);
        try {
            var bHeight = iframe.contentWindow.document.body.scrollHeight;
            var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
            var height = Math.max(bHeight, dHeight);
            iframe.height = height;
        } catch (ex) { }
}

function UserEdit_news1_chk(){
if (document.UserEdit_news1.n1.value==0 && document.UserEdit_news1.n2.value==0){
 alert("-请选择标签-");
 Editshown('UserEdit_news1',7,7);
 return false;
}
if (document.UserEdit_news1.n_title.value==""){
 alert("-请填写内容-");
 document.UserEdit_news1.n_title.focus();
 return false;
}

}

/**

判断时间大小

sdate1: 开始时间

edate2: 结束时间

return: true/false

**/
    function checkDate(sdate1,edate2)
    {
       if(sdate1!=""&&edate2!="")
       { //输入不为空时；
           // 对字符串进行处理
           // 以 - / 或 空格 为分隔符, 将日期字符串分割为数组
          var date1 = sdate1.split("-");
          var date2 = edate2.split("-");
           // 创建 Date 对象
           var myDate1 = new Date(date1[0],date1[1],date1[2]);
           var myDate2 = new Date(date2[0],date2[1],date2[2]);
           
           // 对日起进行比较
           if (myDate1 <= myDate2)
           {
                return true;
           }else
           {
             return false;
           }
       }
       else
       {
             return true;
       }
     }



function UserEdit_news2_chk(){
if (document.UserEdit_news2.n1.value==0 && document.UserEdit_news2.n2.value==0){
 alert("-请选择标签-");
 Editshown('UserEdit_news2',7,7);
 return false;
}
if (document.UserEdit_news2.n_title.value==""){
 alert("-请填写内容-");
 document.UserEdit_news2.n_title.focus();
 return false;
}
if (document.UserEdit_news2.n_begindate.value==""){
 alert("-请填写开始时间-");
 document.UserEdit_news2.n_begindate.focus();
 return false;
}
if (document.UserEdit_news2.n_enddate.value==""){
 alert("-请填写结束时间-");
 document.UserEdit_news2.n_enddate.focus();
 return false;
}
if (!checkDate(document.UserEdit_news2.n_begindate.value,document.UserEdit_news2.n_enddate.value)){
 alert ("-开始时间不能大于结束时间-");
 document.UserEdit_news2.n_begindate.focus();
 return false;
}
/*if (document.UserEdit_news2.n_begindate.value==document.UserEdit_news2.n_enddate.value){
 alert("-开始时间不能与结束时间相同-");
 document.UserEdit_news2.n_enddate.focus();
 return false;
}*/

}

function UserEdit_news3_chk(){
if (document.UserEdit_news3.n1.value==0 && document.UserEdit_news3.n2.value==0){
 alert("-请选择标签-");
 Editshown('UserEdit_news3',7,7);
 return false;
}
if (document.UserEdit_news3.n_title.value==""){
 alert("-请填写内容-");
 document.UserEdit_news3.n_title.focus();
 return false;
}

}






function ImgBig(name){
	
	var obj = document.getElementById(name);
	
	if(obj.className == "Img60"){
	     obj.className="ImgBig";
	}else{ 
	     obj.className="Img60";
	} 
	
}


function FlvShow(name,Ft,Furl){
	
var obj = document.getElementById(name);

	if(Ft == 0){
	     obj.innerHTML="<img src='/Images/shousuo.gif' /> <a href='javascript:;' onclick=FlvNone('"+name+"') ><font color='#0D8CFF'>收缩</font></a><br><object type='application/x-shockwave-flash' data='/Images/player_flv_maxi.swf' width='480' height='400'><param name='movie' value='/Images/player_flv_maxi.swf' /><param name='allowFullScreen' value='true' /><param name='allowScriptAccess' value='always' /><param name='FlashVars' value='flv=/UploadFiles/Video/"+Furl+"&amp;startimage=/Images/Logo.png&amp;autoplay=0&amp;loadingcolor=E94C18&amp;showiconplay=1&amp;showmouse=autohide&amp;showvolume=1&amp;showstop=1&amp;showloading=always&amp;showplayer=always&amp;showtime=1&amp;margin=0&amp;showfullscreen=1' /><p><a href='http://www.adobe.com/go/getflashplayer'>Install now Flash Player .</a></p></object>";
	}else{ 
	     obj.innerHTML="<img src='/Images/shousuo.gif' /> <a href='javascript:;' onclick=FlvNone('"+name+"') ><font color='#0D8CFF'>收缩</font></a><br><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='480' height='400'><param name='movie' value='"+Furl+"' /><param name='quality' value='high' /><embed src='"+Furl+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='480' height='400'></embed></object>";
	} 
	
}

function FlvNone(name){
	document.getElementById(name).innerHTML="<img src='/Images/flv.gif' style='border-right:1PX solid #FFFFFF;border-bottom:1PX solid #FFFFFF;float:left' />";
}


function IFormBlock(name){
	
	var obj = document.getElementById(name);
	
	if(obj.style.display == "block"){
	     obj.style.display = "none";
	}else{ 
	     obj.style.display = "block";
	} 
	
}



function CheckBotton(t,id,uid)
{ 
   document.scripts[0].src = "/Home/Check.asp?T="+ t +"&ID=" + id +"&UID="+ uid;
}


function AdminHot(tj,id,uid)
{ 
   document.scripts[0].src = "/Home/Admin.asp?T=b&Tj="+ tj +"&ID=" + id +"&UID="+ uid;
}

function AdminDel(id)
{ 
   document.scripts[0].src = "/Home/Check.asp?T=Del&ID=" + id ;
}

function AdminJing(Jing1,id,uid)
{ 
   document.scripts[0].src = "/Home/Admin.asp?T=c&Jing1="+ Jing1 +"&ID=" + id +"&UID="+ uid;
}

