function jmenu_show(sID,iSt){
	var oMenu = document.getElementById(sID);
	if(iSt){oMenu.className = 'menu_dropdown show_el';}else{oMenu.className = 'menu_dropdown hidd_el';};
};

/********************************************/
function wCheckFrmLogin(){
	var cookieEnabled=(navigator.cookieEnabled)? true : false
	if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ 
		document.cookie="testcookie";
		cookieEnabled=(document.cookie=="testcookie")? true : false;
		document.cookie="";
	};
	
	if (!cookieEnabled){alert('您的浏览器不能使用cookie,或者您禁止了cookie.\n\n本系统必须使用cookie技术,要使用本系统,请打开cookie!!');return false;};
	
	var oThe = document.frmLogin;oThe.isJavascript.value='ok';
	
	if (oThe.txtUserName.value==''){alert('请输入登陆帐号！');	oThe.txtUserName.focus();return false;};
	if (oThe.txtUserPass.value==''){alert('请输入登陆密码！');	oThe.txtUserPass.focus();return false;};
	if (oThe.txtUserCode.value.length!=4){alert('请输入验证码！');oThe.txtUserCode.focus();return false;};
};

function wShowLoginCode(){
	if (document.getElementById("wLoginCode")){
		var oThe = document.getElementById("wLoginCode");
		if(oThe.innerHTML==''){
			oThe.innerHTML = '<img src="/inc/GetVerifyImage.aspx?a=' + Math.random() + '" align="middle" class="verifycode" onClick="RefreshImgCode(this);" title="如果您无法识别验证码，请点击更换图片。">';
		};
	};
};

function RefreshImgCode(oThe){oThe.src = "/inc/GetVerifyImage.aspx?a=" + Math.random();};


/*************************************
 * AJAX class
 * @author tangh
 *************************************/
function AJAXRequest(){
	var xmlObj = false;
	var CBfunc,ObjSelf;
	ObjSelf=this;

	if (window.ActiveXObject) {
	    try {xmlObj = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {try {xmlObj = new ActiveXObject("Microsoft.XMLHTTP");} catch (e) {xmlObj=false;};};
	}else if (window.XMLHttpRequest) {
	    xmlObj = new XMLHttpRequest();
	    if (xmlObj.overrideMimeType) {xmlObj.overrideMimeType('text/xml;charset=utf-8');};
	};
	
	if (!xmlObj) return false;
	this.method="GET";
	this.url;
	this.async=true;
	this.content="";
	this.callback=function(cbobj) {return;}
	this.send=function() {
		if(!this.method||!this.url||!this.async) return false;
		xmlObj.open (this.method, this.url, this.async);
		//xmlObj.setrequestheader("cache-control","no-cache");
		if(xmlObj && window.ActiveXObject)
		    xmlObj.setRequestHeader("cache-control","no-cache");
		else if(xmlObj && window.XMLHttpRequest)
		    xmlObj.setRequestHeader("cache-control","max-age=0");
		if(this.method=="POST"){
			xmlObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		}else{
			xmlObj.setRequestHeader("Content-Type","text/html;charset=utf-8");
		};
		xmlObj.onreadystatechange=function() {
			//alert("ready:"+xmlObj.readyState);
			if(xmlObj.readyState==4) {
				//alert("status:"+xmlObj.status);
				if(xmlObj.status==200){ObjSelf.callback(xmlObj);};
			};
		};
		if(this.method=="POST") xmlObj.send(this.content);
		else xmlObj.send(null);
	};
};

/*************************************
 * Marquee
 *************************************/
function Show_Marquee_Left(key){
	if(!jGet(key + "_m0")){return;};

	var oThe0 = jGet(key + "_m0");
	var oThe1 = jGet(key + "_m1");
	if(oThe1.innerHTML.length<10){return;};

	var speed = 100;
	var oWW = oThe1.offsetWidth;

	if(oWW>oThe0.offsetWidth){
		oThe1.innerHTML = (oThe1.innerHTML + oThe1.innerHTML);
		var MyMar=setInterval("Marquee_Left('"+key+"',"+oWW+")",speed);
		oThe0.onmouseover=function(){clearInterval(MyMar)};
		oThe0.onmouseout=function(){MyMar=setInterval("Marquee_Left('"+key+"',"+oWW+")",speed)};
	};
};

function Marquee_Left(key,oWW){
	var oThe0 	= jGet(key + "_m0");
	var mSp	= 10;
	jGet("test").innerHTML = oWW + ' = ' + oThe0.scrollLeft;
	if(oWW<=oThe0.scrollLeft){oThe0.scrollLeft-=oWW;}else{oThe0.scrollLeft+=mSp;};
};
