<!--
	document.write('<scri'+'pt src="/common/script/prototype.js"></scri'+'pt>');
	
	window.onload=function(){
		//window.focus();
	}	
	
	function openWindow(theURL,winName,features) {
	  window.open(theURL,winName,features);
	}
	
	function initFirstViewURL(){
			var firstViewURL;			
			// 从Cookie中获取
			firstViewURL = getCookie("firstViewURL", "");			
			
			// Cookie中不存在,则重新获取
			if (firstViewURL == "undefined" || firstViewURL == ""){
				firstViewURL = window.location.href;	
				if (firstViewURL == "undefined" || firstViewURL == ""){
					firstViewURL = window.location;
					if (firstViewURL == "undefined" || firstViewURL == ""){
						firstViewURL = document.location.href;
						if (firstViewURL == "undefined" || firstViewURL == ""){
							firstViewURL = top.location.href;			
						}
					}
				}
				// 存入Cookie中,
				setCookie("firstViewURL",  firstViewURL, 60*60*24*365, "/", ".10000study.com");
			}
	}
	initFirstViewURL();
	
	// 写 cookie; iTime单位为秒
	function setCookie(sName, sValue, iTime, sPath, sDomain){
		var date = new Date();
		date.setTime(date.getTime()+iTime*1000);
		var sCookie = escape(sName) + "=" + escape(sValue) + ";";
		if(iTime!=0){
			sCookie+="expires=" + date.toGMTString()+";"; 
		}
		sCookie+="path="+sPath+";domain="+sDomain;	
		document.cookie = sCookie;
	}
	
	// 读 cookie
	function getCookie(sName, sDefaultValue){
		alert(sName);
		var aCookie = document.cookie.split("; ");		
		for (var i=0; i < aCookie.length; i++) {
			var aCrumb = aCookie[i].split("=");			
			if (escape(sName) == aCrumb[0]) return unescape(aCrumb[1]);
		}
		return sDefaultValue;
	}
	
	// 读 cookie
	function getCookie(sName){
		var aCookie = document.cookie.split("; ");
		for (var i=0; i < aCookie.length; i++) {
			var aCrumb = aCookie[i].split("=");
			if (escape(sName) == aCrumb[0]) return aCrumb[1];
		}
		return "";
	}
	
	// 删 cookie
	function delCookie(sName){
		var date = new Date();
		document.cookie = sName + "= ; expires=" + date.toGMTString();
	}
	
	// Public
	//显示问题,根据点击的按钮进行页面跳转
	function QuestionGoTo(QuestionString,trueURL,falseURL){
		if(confirm(QuestionString)){		
			window.location.href=trueURL;
		}else{
			if(falseURL==""){
				;
			}else{
				window.location.href=falseURL;
			}
		}
	}
	function go(strer){
		var tmpURL=strer;
		if(tmpURL=="-1"){
			history.back(-1);
		}else{
			document.location.href=tmpURL;
		}
	}
	function isClickReturn(info,type){
		var re=false;
		var msg="";
		switch (type){
			case 1:
				msg='您确定 '+info+' 吗？';
				break;
			case 2:
				msg='您确定要 '+info+' 吗？\n\n执行该操作后将不可恢复！';
				break;
			default :
				msg=info;
				break;
		}
		var tmptrue=window.confirm(msg);
		if (tmptrue) { re=true; }
		return re;
	}
	function doWindowReload(){
		window.location.href=window.location;
		return true;
	}
	function isRunReturn(message){
		if (window.confirm(message)) {
			return true;
		}else{
			return false;
		}
	}
	function getTimeToday(){
		var now = new Date();
		var yys=now.getYear()
		var yy=(yys < 1000) ? yys + 1900 : yys;
		var dd = now.getDate() , mt = now.getMonth() + 1 ,weekVal = now.getDay();
		if (weekVal==0) msg1="星期日";
		else if (weekVal==1) msg1="星期一";
		else if (weekVal==2) msg1="星期二";
		else if (weekVal==3) msg1="星期三";
		else if (weekVal==4) msg1="星期四";
		else if (weekVal==5) msg1="星期五";
		else if (weekVal==6) msg1="星期六";
		return "今天是 "+yy+"-"+mt+"-"+dd+" "+msg1;
	}
	
	//DataLoader
	function GetResult(method, url) {		
		var XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP");
		if(XMLHTTP==null)
			XMLHTTP=new ActiveXObject('Msxml2.XMLHTTP');
		if(XMLHTTP==null)
			XMLHTTP=new XMLHttpRequest();
		//特殊字符：+,%,&,=,?等的传输解决办法.字符串先用escape编码的. 
		XMLHTTP.open(method, url, false); 		
		XMLHTTP.send();	
		
		//服务器端处理返回的是经过escape编码的字符串.
		var result = unescape(XMLHTTP.responseText);
		return result;
	}
	
	/*
	function GetResult(method, url) {
		var result ="";
		
		new Ajax.Request(url,{
			method: method,
			parameters: '',
			onSuccess: function(transport){result = transport.responseText},
			onFailure: function(){result="Failure";}
		});
		
		return result;
	}
	*/

	
	/**
	 * 创建最大内容输入检查器
	 */
	function createMaxLimit(InputObject, maxTotal){
		var name=InputObject.name;
		document.write("<div class=\"space\"></div>");
        document.write("<div>最多字数：<span id=\""+name+"MaxTotal\">"+maxTotal+"</span>　　　已用字数：<span id=\""+name+"UsedTotal\">0</span>　　　剩余字数：<span id=\""+name+"RemainTotal\">"+maxTotal+"</span> </div>");
		
		var MaxTotal=document.getElementById(name+"MaxTotal");
		var UsedTotal=document.getElementById(name+"UsedTotal");
		var RemainTotal=document.getElementById(name+"RemainTotal");
		// 进行首次计算
		inputCount(InputObject, MaxTotal, UsedTotal, RemainTotal);
		// 注册事件监听器
		InputObject.onkeydown=InputObject.onkeyup=function(){		
			inputCount(InputObject, MaxTotal, UsedTotal, RemainTotal);
		}
	}
	
	/**
	 * 最大内容输入检查
	 * content:	内容对象
	 * total:	最多字数
	 * used:	已用字数
	 * remain:	剩余字数
	 */
	function inputCount(InputObject, MaxTotal, UsedTotal, RemainTotal){
		// 取得文本对象中内容的长度
		var inputTotal = parseInt(InputObject.value.length);
		// 取得最大可输入的字数
		var maxTotal = parseInt(MaxTotal.innerHTML);
		// 取得还可输入的字数
		var remainTotal = parseInt(RemainTotal.innerHTML);		
		// 当前内容长度如果大于最大长度
		if (inputTotal > maxTotal) {
			InputObject.value = InputObject.value.substring(0, maxTotal);
			UsedTotal.innerHTML = "" + maxTotal;
			RemainTotal.innerHTML = "0";			
		}else{
			UsedTotal.innerHTML = "" + inputTotal;
			RemainTotal.innerHTML = "" + (maxTotal-parseInt(UsedTotal.innerHTML));
		}		
	}
	
	/**
	 * 对指定的对象进行value的设置
	 * name: 对象的名称
	 * value: 变量
	 */
	function setValue(name, value){
		document.getElementById(name).value=value;
	}
	
	/**
	 * 取得两位小数点
	 *
	 */
	function fixedNumber(value){
		return parseFloat(value).toFixed(2);
		//return Math.round(parseFloat(value)*100)/100;
	}
	
	/**
	 * 复制文本内容
	 */
	function copyText(obj) {
		ie = (document.all)? true:false
		if (ie){
			var rng = document.body.createTextRange();
			rng.moveToElementText(obj);
			rng.scrollIntoView();
			rng.select();
			rng.execCommand("Copy");
			rng.collapse(false);
		}
	}
	
	/**
	 * 检查是否安装了腾讯QQ
	 */
	function IsInstallQQ(){
		try{
			var xmlhttp=new ActiveXObject("TimwpDll.TimwpCheck");
			return true;
		}catch(e){
			return false;
		}
		return false;
	}
	
	/**
	 * 打开腾讯QQ对话框
	 */
	function OpenQQMsg(QQ,Site){
		if(IsInstallQQ()){
			location.href="tencent://message/?uin="+QQ+"&Site="+Site+"&Menu=yes";
		}else{
			alert("对不起！您没有安装腾讯QQ，请安装后再点击！下载网址：http://www.qq.com");
		}
	}
	
	/**
	 * 取得窗口大小,sizeName: width或height
	 */
	function getWindowSize(sizeName){
		var windowWidth, windowHeight;
		if (self.innerHeight) {  // all except Explorer
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		} 
		if(sizeName=="width")
			return windowWidth;
		else  if(sizeName=="height")
			return windowHeight;
	}
	
	/**
	 * 满屏显示
	 *
	 */
	function resetWindowFullSize(){
		/* 方法一 */
		moveTo(0,0);
		resizeTo(screen.Width,screen.Height);
		resizeTo(screen.Width+screenLeft*2,screen.Height+(screen.Height-document.body.offsetHeight));
		moveTo(-screenLeft,-screenTop);
		
		/* 方法二
		moveTo(0,0);
		resizeTo(screen.availWidth,screen.availHeight);
		resizeTo(screen.availWidth+screenLeft*2,screen.availHeight+(screen.availHeight-document.body.offsetHeight));
		moveTo(-screenLeft,-screenTop);
		*/
		
		/* 方法三
		top.moveTo(0,0);
		top.resizeTo(screen.availWidth,screen.availHeight);
		*/
	}
	
	// 正则表达式
	function execRE(re,rp,content) {
		oReg=new RegExp(re,"ig");
		r = content.replace(oReg, rp);
		return r; 
	}
	
	// 清除代码
	function codeSweeper(content, mode){
		switch(mode)
		{
			case "allhtml":
					// 清除所有html标签
					content = execRE("</?[^>]*>", "", content);
					break;
				case "word":
					// 清除所有的xml标签
					content = execRE("<\\?xml[^>]*>", "", content);
					// 清除所有的带名称空间的标签
					content = execRE("<\/?[a-z]+:[^>]*>", "", content);                
					// 清除所有的class属性    
					content = execRE("(<[^>]+) class=[^ |^>]*([^>]*>)", "$1 $2", content);            
					// 清除所有的style属性
					content = execRE("(<[^>]+) style=\"[^\"]*\"([^>]*>)", "$1 $2", content);
					// 清除所有空的span标签
					content = execRE("<span[^>]*><\/span[^>]*>", "", content);                     
					// 清除所有的多余span标签
					content = execRE("<span><span>","<span>", content);                             
					content = execRE("</span></span>","</span>", content);
					// 清除所有的多余空白
					content = execRE("[ ]*>", ">", content);            
					break;
				case "css":
					// 清除所有的class属性    
					content = execRE("(<[^>]+) class=[^ |^>]*([^>]*>)", "$1 $2", content);            
					// 清除所有的style属性
					content = execRE("(<[^>]+) style=\"[^\"]*\"([^>]*>)", "$1 $2", content);
					break;
				case "font":
					content = execRE("</?font[^>]*>", "", content);
					break;
				case "span":
					content = execRE("</?span[^>]*>","",content);
					break;  
				case "script":
					break;  
		}
		return content;
	}
	
	//去左空格; 
	function ltrim(s){ 
		return s.replace( /^\s*/, ""); 
	} 
	//去右空格; 
	function rtrim(s){ 
		return s.replace( /\s*$/, ""); 
	} 
	//去左右空格; 
	function trim(s){ 
		return rtrim(ltrim(s)); 
	}
	
	/**
	 * 判断IE是5.5还是6.0然后执行关闭
	 */
	function Close(){ 
		var ua = navigator.userAgent;
		var ie = navigator.appName == "Microsoft Internet Explorer" ? true:false;
		if (ie){ 
			var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))));
			if (IEversion< 5.5){ 
				var str  = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'; 
				str += '<param name="Command" value="Close"></object>'; 
				document.body.insertAdjacentHTML("beforeEnd", str); 
				document.all.noTipClose.Click();
			}else{ 
				window.close();
			}
		}else{
			window.close();
		} 
	}

-->