﻿<!--
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
var s;
(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
if (Sys.ie && parseInt(Sys.ie) <= 7){document.writeln("<script type='text/javascript' src='/Inc/IE8.js'></script>");}

function SetCookie(name,value){
     var argv=SetCookie.arguments;
     var argc=SetCookie.arguments.length;
     var expires=(2<argc)?argv[2]:null;
     var path=(3<argc)?argv[3]:null;
     var domain=(4<argc)?argv[4]:null;
     var secure=(5<argc)?argv[5]:false;
     document.cookie=name+"="+escape(value)+((expires==null)?"":("; expires="+expires.toGMTString()))+((path==null)?"":("; path="+path))+((domain==null)?"":("; domain="+domain))+((secure==true)?"; secure":"");
} 

function GetCookie(Name) {
     var search = Name + "=";
     var returnvalue = "";
     if (document.cookie.length > 0) {
           offset = document.cookie.indexOf(search);
           if (offset != -1) {      
                 offset += search.length;
                 end = document.cookie.indexOf(";", offset);                        
                 if (end == -1)
                       end = document.cookie.length;
                 returnvalue=unescape(document.cookie.substring(offset,end));
           }
     }
     return returnvalue;
}

function changelang(lang){
     if(lang!=""){
           var expdate=new Date();
           expdate.setTime(expdate.getTime()+(24*60*60*1000*30));
           //expdate=null;
                                   //以下设置COOKIES时间为1年,自己随便设置该时间..
           SetCookie("SYS_Lang",lang,expdate,"/",null,false);
     }
}

function doZoom(size){
	document.getElementById('zoom').style.fontSize=size+'px';
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
 var anchor = anchors[i];
 if (anchor.getAttribute("href") &&
 anchor.getAttribute("rel") == "external")
 anchor.target = "_blank";
 }
}
window.onload = externalLinks;

function TopicDeleteReco(IdList)
{
    if(IdList == "") return false;
    if(confirm("只有管理员和版主可操作！\n\n是否确定要删除该话题？"))
    {
        self.location.href = "/web/Resource_Process.aspx?Work=DeleteReco&IdList=" + IdList;
    }else{
        return false;
    }
}

function OpenWin(win,url,w,h)
{
    parameter = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width="+w+",height="+h+"";
    return window.open(url,win,parameter);
}

function AjaxObj()
{
var A=null; 
try 
{ 
A=new ActiveXObject("Ms"+"xml2.XML"+"HTTP"); 
} 
catch(e)
{ 
try 
{ 
A=new ActiveXObject("Micro"+"soft.XML"+"HTTP"); 
}
catch(oc)
{ 
A=null 
} 
} 
if ( !A && typeof XMLHttpRequest != "undefined" ) 
{ 
A=new XMLHttpRequest() 
} 
return A 
}

 function AjaxOnload(url,innerID)
{
var http = AjaxObj();
http.open("GET",url,false);
http.setRequestHeader("If-Modified-Since","0");
http.send(null);
var str = http.responseText;
document.getElementById(innerID).innerHTML = str;
}

function ShowClassMenu(num,sum,type){
if (type==1){
	for (i=1;i<sum+1;i++){
		if (i==num){
            document.getElementById('ClassMenu' + i).style.display="block";
		}else{
            document.getElementById('ClassMenu' + i).style.display="none";
		}
	}
	return false;
}else{
	for (i=1;i<sum+1;i++){
		if (i==num){
	    	if (document.getElementById('ClassMenu' + i).style.display=="none"){
                document.getElementById('ClassMenu' + i).style.display="block";
		    }else{
                document.getElementById('ClassMenu' + i).style.display="none";
			}
		}
	}
	return false;
}
}

function UpdateImgShow(obj){
	var w = 600;
    if(obj.width>=obj.height&&obj.width>w){obj.width=w;}if(obj.height>obj.width&&obj.height>w){obj.height=w;}
}
//-->

