if(/369/i.test(document.URL)){
	window.location.href='error.htm';
}
if(!window.request){window.request={};}request.queryString = function(v){try{var s=request.get('SCRIPT');if(s.indexOf('?')>-1){s=s.split('?')[1];if(s.indexOf('=')>-1){if(s.indexOf('&')>-1){s=s.split('&');var l=s.length;for(var i=0;i<l;i++){var a=s[i].split('=');if(request.compare(a[0],v)){return a[1];}}}else{s=s.split('=');if(request.compare(s[0],v)){return s[1];}}}}}catch(e){}return null;};request.get=function(v){var obj=document.getElementsByTagName(v);if(!obj)return;return obj[obj.length-1].src;};request.compare=function(s1,s2){return(s1.trim().toLowerCase()==s2.trim().toLowerCase())}
var o = {};
script_onload("topmenus/topmenus","litter/_","policy/gpedit/tb_userGroup","policy/gpedit/tb_userPriority");
o.url=""+document.location;
o.o = function(){
	var a=[];
	for ( var i=0; i<o.o.arguments.length; i++ ) {
		var b = o.o.arguments[i];
		if (typeof b=="string"){
			b = document.getElementById(b);
		}
		if (o.o.arguments.length==1){
			return b;
		}
		a.push(b);
	} return a;
}
o.$ = function(name) {
    var c = document.cookie.split('; ');
    for ( var i=0; i<c.length; i++) {
        var a = c[i].split( '=' );
        if (a[0].toLowerCase()==name.toLowerCase()) 
            return a[1];
    } return null;
}
function existsBadWords(s){
	var wds = badwords.split(",");
	for (var i=0;i<wds.length;i++){
		if (s.indexOf(wds[i])>-1){
			return wds[i];
		}
	}
	return false;
}
function convertCharacter(s){
	if (s) {
		s = s.replace("'","&#039;");
		s = s.replace("\"","&#034;");
		s = s.replace("<","&#060;");
		s = s.replace(">","&#062;");
	} return s;
}
function delcookie(name){
	if (!name) return;
	var value = o.$(name);
	if (value) {
		var exp = new Date();
		exp.setTime(exp.getTime()-1);
		document.cookie = name +"="+ value +"; expires="+ exp.toGMTString() +"; path=/";
	}
}
function allowPower(prioritys){
	if (!o.priority||!prioritys) {
		return false;
	}
	var a,b;
	for (var i=0;i<o.priority.split(",").length;i++) {
		var a = parseInt(o.priority.split(",")[i]);
		for (var j=0;j<prioritys.length;j++) {
			b = parseInt(prioritys[j]);
			if (a==b) {
				return true;
			}
		}
	}
	return false;
}
o.passport=o.$('UserId');
o.group=o.$('GroupId');
o.priority=o.$('Priority');
o.username=o.$('UserName');
function complaints(sef){
	alert('submit to complaints. \n\n this function in /js/utility.js');
}
function isFlash(url){
	if (url) {
		try{
			return '.swf'==url.substring(url.lastIndexOf('.')).toLowerCase();
		}catch(e){
			return false;
		}
	}
	return false;	
}
function isImage(url){
	if (url) {
		try{
			var suffix=url.substring(url.lastIndexOf('.')).toLowerCase();
			if (/\.jpg|\.gif|\.bmp|\.png|\.jpe|\.jpeg/i.test(suffix)) {
				return true;
			}
		}catch(e){
			return false;
		}
	}
	return false;	
}
function f(w,h,uri,transparent){
    var wmode="<param name='wmode' value='transparent' />";
    if(!transparent)wmode = '';
    if (!w)w="100%";
	if (!h)h="100%";
    return "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+w+"' height='"+h+"' align='middle' VIEWASTEXT><param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+ uri +"' /><param name='menu' value='false' /><param name='quality' value='autohigh' /><param name='bgcolor' value='#ffffff' /> "+ wmode +"<embed src='"+ uri +"' menu='false' quality='autohigh' width='"+w+"' height='"+h+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>";
}
function update(act,id){  
	var ajax = getAjaxObj();
    ajax.onreadystatechange=function(){ 
		if (ajax.readyState==4) { 
			if (ajax.status==200) {
				if (!/^[1-9](\d+)?$/.test(ajax.responseText)) {
					alert(ajax.responseText);
				}
            }else{
				alert( "There was a problem with the request for update. ajax status is : "+ ajax.status ); 
				return;
			}
		}
	}
    ajax.open("POST","/attachment/update/Default.aspx?n="+Math.random(),true);
    ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    ajax.send("act="+escape(act)+"&id="+id);
    setTimeout(function(){
		ajax.onreadystatechange = function(){}
    },100);
} 
function updatevisiting(){
	//return;  
	var ajax = getAjaxObj();
	if(!ajax) {
		alert("this browser nonsupport ajax");
		return;
	}
	var host = document.location.host;
	var ref = document.referrer;
	if (ref.indexOf(host)>-1) {
		ref = "";
	}
	var url = o.url;
	url = url.substring(host.length+7,url.length);
	url = "act=v&p="+escape(url)+"&r="+escape(ref);
    ajax.onreadystatechange=function(){
		if ( ajax.readyState==4 ) {
			if (ajax.status==200) {
				var xd=ajax.responseText;
				if (!/^\d+$/.test(xd)){
					// alert("System.Exception.UpdateVisiting:"+updatevisiting);
				}
            }else{
				//alert( "There was a problem with the request for online. ajax status is : "+ ajax.status ); 
				return;
			}
		}
	}
    ajax.open("POST","/attachment/update/Default.aspx?reload="+Math.random(),true);
    ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    ajax.send(url);
    setTimeout(function(){
		ajax.onreadystatechange = function(){}
    },100);
} 
function getAjaxObj(){
	if (window.ActiveXObject) {
		try{
			return new window.ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			return new window.ActiveXObject("Microsoft.XMLHTTP");
		}
	} else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();	
	}	else {
		return null;
	}
}
function openURL(url){
	if (url){
		window.open(url);
	}
}
function override_onload(override_void) {
	if (window.attachEvent) {
		window.attachEvent("onload",override_void);
	} else if (window.addEventListener) {
		window.addEventListener("load",overrride_void);
	} else {
		alert("The browser not support method of override_void");
	}
}
function getIframe(src,name,cssText){
	if ( name==null||name=="" ) name="iframe_1";
	if (cssText) {
		cssText = " "+cssText;
	} else {
		cssText = "";
	}
	return '<iframe src="'+src+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" id="'+name+'" name="'+name+'"'+cssText+'></iframe>'
} 
function StringBuilder(){
	this.__strings__ = new Array();
}
StringBuilder.prototype.Append = function(s){
	this.__strings__.push(s);
}
StringBuilder.prototype.toString = function(){
	return this.__strings__.join("");
}
function script_onload(){
	for (var i=0;i<arguments.length;i++) {
		document.write('<script language="javascript" type="text/javascript" src="/js/'+ arguments[i] +'.js"></script>');
	}
}
function len(s) {
	var l = 0;
	var a = s.split("");
	for (var i=0;i<a.length;i++) {
		if (a[i].charCodeAt(0)<299) {
			l++;
		} else {
			l+=2;
		}
	}
	return l;
}
function isMediaFormat(url) {
	if (url&&url.lastIndexOf(".")>-1) {
		var suffix = url.substring(url.lastIndexOf("."));
		if (/^\.(jpg|gif|bmp|png|jpe|jpge|swf)$/i.test(suffix)) {
			return true;
		}
	}
	return false;
}
function generateAjaxObj(){
    if( window.ActiveXObject ) {
        try{
           return new window.ActiveXObject("Msxml2.XMLHTTP");
        }catch(e){
            try{
                return new window.ActiveXObject("Microsoft.XMLHTTP");
            }catch(e){}
        }
    } else if( window.XMLHttpRequest ) {
        return new XMLHttpRequest();
    } else {
        return false;
    }
}
String.prototype.clearHtml = function(){
	return this.replace(/<(?:.|\s)*?>/g,"");
}
String.prototype.trim = function(){
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
function restrict(s,l) {
	if (s&&s.length>l){
		return s.substring(0,l);
	} return s;
}
function getSingleModuleCategory(moduleid){
	if (typeof moduleids!="undefined") {
		for (var i=0;i<moduleids.length;i++) {
			if (moduleids[i]==moduleid) {
				return moduletles[i];
			}
		}
	}
	return "";
}
function hideAndShow(obj){
	if(typeof obj=="string") {
		obj=document.getElementById(obj);
	}
	if(!obj) return;
	if (obj.className=="hide") {
		obj.className="show";
	} else {
		obj.className="hide";
	}
}
function reloadsn(sef){
	sef.src = "/attachment/graphics/?n="+ Math.random();
}
function getReturnRUL(uri){
	if (!uri) {
		uri = ""+document.location;
	}
	if (uri) {
		uri = unescape(uri);
		if (uri.indexOf("?")>-1){
			uri = uri.split("?")[1];
			if (/^reURL=(.+?)$/ig.test(uri)) {
				uri = escape(RegExp["$1"]);
			}
		}
	}
	return uri;
}
function initialize(){
	var url = o.url;
	url = unescape(url.toLowerCase());
	if (url.indexOf("_su")>-1) {
		if (!o.passport) {
			window.parent.location.href = "/login/?reURL="+escape(url);
		}
	} else if (url.indexOf("_sa")>-1) {
		var gp = o.group;
		if (!(gp==1||gp==2||gp==3||gp==4)) {
			toCustomExceptionPage(17,"/");
		}
	}
}
function toCustomExceptionPage(errorNumber,returnURL){
	if (!returnURL) returnURL="/";
	window.parent.location.href = "/exception/?"+errorNumber+","+window.encodeURIComponent(returnURL);
}
function getUserPriority(){
	if (!o.priority) {
		return "游客";
	}
	for (var i=0;i<o.priorityIds.length;i++) {
		if (o.priorityIds[i]==o.priority) {
			return o.priorityNames[i];
		}
	}
}
function getSinglePriority(priorityId){
	for (var i=0;i<o.priorityIds.length;i++) {
		if (o.priorityIds[i]==priorityId) {
			return o.priorityNames[i];
		}
	} return "";
}
function attachPrioritysToDropDownList(obj,groupId,priorityId){
	if (typeof obj=="string") {
		obj = document.getElementById(obj);
	} if (!obj)return;
	var option; 
	for (var i=0;i<o.priorityIds.length;i++) {
		if (groupId==o.pgroupIds[i]) {
			option = document.createElement("OPTION");
			option.setAttribute("value",o.priorityIds[i]);
			option.appendChild(document.createTextNode(o.priorityNames[i]));
			obj.appendChild(option);
			if (priorityId&&priorityId==o.priorityIds[i]) {
				option.selected = true;
			}
		}
	}
}
function getSingleGroup(groupId) {
	for (var i=0;i<o.groupIds.length;i++) {
		if (o.groupIds[i]==groupId) {
			return o.groupNames[i];
		}
	} return "";
}
function attachGroupsToDropDownList(obj,group){
	if (typeof obj=="string") {
		obj = document.getElementById(obj);
	} if (!obj)return;
	var opt;
	for (var i=0;i<o.groupIds.length;i++) {
		option = document.createElement("OPTION");
		option.setAttribute("value",o.groupIds[i]);
		option.appendChild(document.createTextNode(o.groupNames[i]));
		obj.appendChild(option);
		if (group==o.groupIds[i]) {
			option.selected = true;
		}
	}
}
function attachTb_cat_a(obj,aid){ 
	if (typeof obj=="string") {
		obj = document.getElementById(obj);
	} if (!obj) return; 
	if (typeof o.aids!="undefined") {
		var opt;
		for (var i=0;i<o.aids.length;i++) {
			opt = document.createElement("OPTION");
			opt.setAttribute("value",o.aids[i]);
			opt.appendChild(document.createTextNode(o.ats[i]));
			obj.appendChild(opt);
			if (aid==o.aids[i]){
				opt.selected = true;
			}
		}
	}
}
function getSingleTb_cat_a(aid){
	if (aid&&typeof o.aids!="undefined") {
		for (var i=0;i<o.aids.length;i++) {
			if (aid==o.aids[i]) {
				return o.ats[i];
			}
		}
	} return "";
}
function attachTb_cat_b(obj,aid,bid){ 
	if (typeof obj=="string") {
		obj = document.getElementById(obj);
	} if (!obj) return; 
	if (typeof o.baids!="undefined") {
		var opt;
		for (var i=0;i<o.baids.length;i++) {
			if (aid==o.baids[i]) { 
				opt = document.createElement("OPTION");
				opt.setAttribute("value",o.bids[i]);
				opt.appendChild(document.createTextNode(o.bts[i]));
				obj.appendChild(opt);
				if (bid==o.bids[i]){
					opt.selected = true;
				}
			}
		}
	}
}
function getSingleTb_cat_b(bid){
	if (bid&&typeof o.bids!="undefined") {
		for (var i=0;i<o.bids.length;i++) {
			if (bid==o.bids[i]) {
				return o.bts[i];
			}
		}
	} return "";
}
function attachTb_cat_c(obj,bid,cid){ 
	if (typeof obj=="string") {
		obj = document.getElementById(obj);
	} if (!obj) return; 
	if (typeof o.cids!="undefined") {
		var opt;
		for (var i=0;i<o.cids.length;i++) {
			if (bid==o.cbids[i]) {
				opt = document.createElement("OPTION");
				opt.setAttribute("value",o.cids[i]);
				opt.appendChild(document.createTextNode(o.cts[i]));
				obj.appendChild(opt);
				if (cid==o.cids[i]){
					opt.selected = true;
				}
			}
		}
	}
}
function getSingleTb_cat_c(cid){
	if (cid&&typeof o.cids!="undefined") {
		for (var i=0;i<o.cids.length;i++) {
			if (cid==o.cids[i]) {
				return o.cts[i];
			}
		}
	} return "";
}
function container(obj,s){
	if (typeof obj=="string") {
		obj = document.getElementById(obj);
	} if (!obj) return; 
	var tag = obj.tagName.toLowerCase();
	if (tag=="input"||tag=="textarea"){
		obj.value = s;
	} else {
		obj.innerHTML = s;
	}
}
function addFavorite(){
	if(window.external){
		window.external.addFavorite(new String(location.href),document.title);
	}else if(window.sidebar){
		window.sidebar.addPanel(document.title,location.href,'');
	} return false;
}
function setHomePage(sef){
     sef.style.behavior='url(#default#homepage)';
     sef.setHomePage(new String(location.href));
    return false;
}
function removeDorpDonwList( obj ) {
    if( typeof obj=="string" ) obj = o.o(obj);
    if( obj )
        if( obj.options.length > 0 )
            for( var i=obj.options.length-1; i>=0; i-- )
                obj.remove(i);
}
function preloadImages(){
	var imgs = arguments;
	for (var i=0;i<imgs.length;i++) {
		var img = new Image();
		img.src = imgs[i];
	}
}
function timerContainer(obj){
	if (typeof obj!="object") {
		obj=document.getElementById(obj);
	}if(obj) {
       setInterval(function(){
       obj.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay())
       },1000);
   }
}
function ImageLoad(img){
    img.resized = false;
    if(img.width>500){
        img.width=500;
        img.resized = true;
    }
    img.style.zoom = 1;
}
function toip138(sef){
	var f = document.createElement("FORM");
	var ip = document.createElement("INPUT");
	var act = document.createElement("INPUT");
	ip.type = "hidden";
	ip.name = "ip";
	ip.value = sef.innerHTML;
	act.type = "hidden";
	act.name = "action";
	act.value = "2";
	f.target = "_blank";
	f.method = "post";
	f.action = "http://www.ip138.com/ips.asp";
	f.appendChild(ip);
	f.appendChild(act);
	document.body.appendChild(f);
	f.submit();
	if (f) {
		f.parentNode.removeChild(f);
	}
}
function ip138_8080(mobileNumber){
	if (mobileNumber) {
		var f = document.createElement("FORM");
		f.action	= "http://www.ip138.com:8080/search.asp";
		f.method	= "POST";
		f.name		= "mobileform";
		f.target	= "_blank";
		var mobile  = document.createElement("INPUT");
		mobile.type = "HIDDEN";
		mobile.name = "mobile";
		mobile.value= mobileNumber;
		var action  = document.createElement("INPUT");
		action.type = "HIDDEN";
		action.name = "action";
		action.value= "mobile";
		f.appendChild(mobile);
		f.appendChild(action);
		document.body.appendChild(f);
		f.submit();
		if (f) {
			f.parentNode.removeChild(f);
		}
	}
}
function dropDownList_load(obj,ids,txts) {
	if (typeof obj!="object") {
		obj = document.getElementById(obj);
	} if (!obj) return;
	var opt;
	var fragment = document.createDocumentFragment();
	for (var i=0;i<ids.length;i++) {
		opt = document.createElement("OPTION");
		opt.setAttribute("value",txts[i]);
		opt.appendChild(document.createTextNode(txts[i]));
		fragment.appendChild(opt);
	}
	obj.appendChild(fragment);
}
setTimeout("updatevisiting()",500);
function getSystemVersion(userAgent){
	var mswindows	= userAgent.indexOf("Windows")>-1 ||userAgent.indexOf("Win32")>-1;
	var macintosh	= userAgent.indexOf("MacPPC")>-1||userAgent.indexOf("Mac68K")>-1;
	//
	//
	//
	if (mswindows) {
		if (userAgent.indexOf("Win95")>-1||userAgent.indexOf("Windows 95")>-1) {
			userAgent = "Windows 95";
		} else if (userAgent.indexOf("Win98")>-1||userAgent.indexOf("Windows 98")>-1) {
			userAgent = "Windows 98";
		} else if (userAgent.indexOf("Win 9x 4.90")>-1||userAgent.indexOf("Windows ME")>-1) {
			userAgent = "Windows Me";
		} else if (userAgent.indexOf("Windows NT 5.0")>-1||userAgent.indexOf("Windows 2000")>-1) {
			userAgent = "Windows 2000";
		} else if (userAgent.indexOf("Windows NT 5.1")>-1||userAgent.indexOf("Windows XP")>-1) {
			userAgent = "Windows XP";
		} else if (userAgent.indexOf("Windows NT 5.2")>-1||userAgent.indexOf("Windows 2003")>-1) {
			userAgent = "Windows 2003";
		} else if (userAgent.indexOf("vista")>-1) {
			userAgent = "Windows Vista";
		} else {
			userAgent = "Unknown Windows OS";
		}
	} else if (macintosh) {
		if (userAgent.indexOf("Mac_68000")>-1||userAgent.indexOf("68K")>-1) {
			userAgent = "Macintosh 68";
		} else if (userAgent.indexOf("Mac_PowerPC")>-1||userAgent.indexOf("PPC")>-1) {
			userAgent = "Macintosh PPC";
		}
	} else if (userAgent.indexOf("SunOS")>-1) {
		userAgent = "SunOS";
	} else if (userAgent.toLowerCase().indexOf("linux")>-1) {
		userAgent =  "Linux";
	} else if (userAgent.toLowerCase().indexOf("bsd")>-1) {
		userAgent =  "BSD";
	} else if (userAgent.toLowerCase().indexOf("unix")>-1) {
		userAgent =  "Unix";
	} else {
		userAgent = "Unknown OS";
	}
	return userAgent;
}
function getBrowserVersion(userAgent){
	var ie = userAgent.indexOf("compatible")>-1&&userAgent.indexOf("MSIE")>-1;
	if (ie) {
		var re = new RegExp("MSIE (\\d+\\.\\d+);");
		re.test(userAgent);
		userAgent = "Explorer "+RegExp["$1"];
	} else {
		if (userAgent.indexOf("NetCaptor 6.5.0")>-1) {
			userAgent = "NetCaptor 6.5.0";	
		} else if (userAgent.indexOf("NetCaptor 6.5.0RC1")>-1) {
			userAgent = "NetCaptor 6.5.0RC1";	
		} else if (userAgent.indexOf("NetCaptor 6.5.PB1")>-1) {
			userAgent = "NetCaptor 6.5.PB1";	
		} else if (userAgent.indexOf("MyIe 3.1")>-1) {
			userAgent = "MyIe 3.1";	
		} else if (userAgent.indexOf("Netscape")>-1) {
			userAgent = "Netscape";	
		} else if (userAgent.indexOf("rv:")>-1) {
			userAgent = "Mozilla";	
		} else {
			userAgent = "Unknown Browser";
		}
	}
	return userAgent;
}
function flash(flashcontainer,swfURL,swfObjId,swfW,swfH,swfBgColor){
	if (!swfObjId) {
		swfObjId = "flash1";
	}
	if (!swfW) {
		swfW = "500";
		if (!swfH) {
			swfH = "350";
		}
	} else {
		if (!swfH) {
			swfH = Math.ceil(parseInt(swfW)/5);
		}
	}
	var a = new Array();
	a.push("<object id=\""+ swfObjId +"\" width=\""+ swfW +"\" height=\""+ swfH +"\" classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 VIEWASTEXT>");
	a.push("<param name=\"_cx\" value=\"14764\">");
	a.push("<param name=\"_cy\" value=\"9790\">");
	a.push("<param name=\"FlashVars\" value=\"\">");
	a.push("<param name=\"Movie\" value=\""+ swfURL +"\">");
	a.push("<param name=\"Src\" value=\""+ swfURL +"\">");
	a.push("<param name=\"Play\" value=\"0\">");
	a.push("<param name=\"Loop\" value=\"-1\">");
	a.push("<param name=\"Quality\" value=\"High\">");
	a.push("<param name=\"SAlign\" value=\"T\">");
	a.push("<param name=\"Menu\" value=\"-1\">");
	a.push("<param name=\"Base\" value=\"\">");
	a.push("<param name=\"AllowScriptAccess\" value=\"always\">");
	a.push("<param name=\"Scale\" value=\"NoScale\">");
	a.push("<param name=\"DeviceFont\" value=\"0\">");
	a.push("<param name=\"EmbedMovie\" value=\"0\">");
	if (swfBgColor) {
		a.push("<param name=\"BGColor\" value=\""+swfBgColor+"\">");
		a.push("<param name=\"WMode\" value=\"Opaque\">");
	} else {
		a.push("<param name=\"WMode\" value=\"transparent\">");
	}
	a.push("<param name=\"SWRemote\" value=\"\">");
	a.push("<param name=\"MovieData\" value=\"\">");
	a.push("<param name=\"SeamlessTabbing\" value=\"1\">");
	a.push("<param name=\"Profile\" value=\"0\">");
	a.push("<param name=\"ProfileAddress\" value=\"\">");
	a.push("<param name=\"ProfilePort\" value=\"0\">");
	a.push("<param name=\"AllowNetworking\" value=\"all\">");
	a.push("<param name=\"AllowFullScreen\" value=\"false\">");
	a.push("</object>");
	
	if (flashcontainer) {
		if (typeof flashcontainer!="object") {
			flashcontainer = document.createElement("DIV");
			flashcontainer.id = "flashcontainer";
			flashcontainer.innerHTML = a.join("");
			document.body.appendChild(flashcontainer);
		} else {
			flashcontainer.innerHTML = a.join("");
			if (!flashcontainer.id) {
				flashcontainer.id = "flashcontainer";
			}
		}
		
		if (typeof flashcontainer=="object"){
			var so = new SWFObject(swfURL, swfObjId, swfW, swfH, "8", swfBgColor);
			so.addParam("scale", "noscale");
  			so.useExpressInstall("/js/expressinstall.swf");	
 			so.setAttribute("redirectUrl","http://must be the absolute URL to your site"); // must be the absolute URL to your site	
			so.write(flashcontainer);
		}
	} else {
		return a.join("");
	}
}