﻿function dogetMethod(url){
	url=encodeURI(url);
	window.parent.location.href=url;
	//window.open(url, "_blank");

}

function dogetMethodBlank(url){
	url=encodeURI(url);
	// window.parent.location.href=url;
	window.open(url, "_blank");

}
// 判断字符是否包含中文
function checkIsChinese(checkStr){

	var   valueLen   =   0;   
	for   (i   =   0;   i   <   checkStr.length;   i   ++) {   
		var   code   =   escape(checkStr.charAt(i));   
		if   ((code.length   >=   4)   &&   (code   <   '%uFF60'   ||   code   >   '%uFF9F'))   
		{   
			   valueLen   +=   2;  
			  //这里表示是全角字符  
		} 
	// else  {   return false;		  //这里是半角   valueLen   ++;     }   
	} 
	if(valueLen > 0){
		return true;
	}  else{
		return false;
	}
}


function createobj222()
{
    xmlhttp = false;
    xmlhttpObj = ["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp","Microsoft.XmlHttp"];
    
    if(window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    {
        for(i=0;i<xmlhttpObj.length;i++)    
        {
            xmlhttp = new ActiveXObject(xmlhttpObj[i]);
            if(xmlhttp)
            {
                break;    
            }
        }
    }
    else
    {
        alert("暂时不能创建XMLHttpRequest对象");
    }
    return xmlhttp?xmlhttp:false;
}


function createobj() {
	if (window.ActiveXObject) {
		return new ActiveXObject("Msxml2.XMLHTTP");
	} else if (window.XMLHttpRequest) {
		return new XMLHttpRequest();
	}
}

function ChangeContentFontSize(pFontSize) {
	if (GetObj("Content")) {
		GetObj("Content").style.fontSize = pFontSize + "px";
	}
}


function checkUserName(str){
   szMsg="[#_%&'\",;:=!^]";
   for(i=1;i<szMsg.length+1;i++){
    if(str.indexOf(szMsg.substring(i-1,i))>-1){
     return false;
	 break;
    }
   }
   return true;
}

function changeClassSift(pCurUrl,pFieldName,pFiledValue){
	var cururl
	cururl=parent.location.href;
	var curPageName;
	curPageName=cururl.split("?")[0];
	var curParameter;
	curParameter=cururl.split("?")[1];
	
	
	
	if (pCurUrl==""){
		cururl=parent.location.href;
	}else{
		if (curParameter==undefined){
			cururl=pCurUrl;
		}else{
			cururl=pCurUrl+"?"+curParameter;
		}
	}
	
	var tempFieldName="";
	var tempFieldValue="";
	if (curParameter!=undefined){
		
		cururl=curPageName+'?';
		
		
		var curParameterArr=curParameter.split("&");
		
		var FieldNameIsIn=false;
		for(var i=0;i<curParameterArr.length;i++){
			
			
			tempFieldName=curParameterArr[i].split("=")[0];
			if (curParameterArr[i].indexOf("@")>0){
				tempFieldValue=curParameterArr[i].split("Search=")[1];
			}else{
				tempFieldValue=curParameterArr[i].split("=")[1];
			}
			
			if(tempFieldName==pFieldName){
				
				
				if (i==curParameterArr.length-1){
					cururl=cururl+tempFieldName+'='+pFiledValue;
				}else{
					cururl=cururl+tempFieldName+'='+pFiledValue+"&";
				}
				
				if (FieldNameIsIn==false) {FieldNameIsIn=true;}
				
			}else{
				if (i==curParameterArr.length-1){
					cururl=cururl+tempFieldName+'='+tempFieldValue;
				}else{
					cururl=cururl+tempFieldName+'='+tempFieldValue+"&";
				}
			}
		}
		
		
		if (FieldNameIsIn==false) {
			cururl=cururl+"&"+pFieldName+'='+pFiledValue;
		}
		
		
		
	}else{
		
		cururl=cururl+'?'+pFieldName+'='+pFiledValue;
	}

	window.location.href=cururl;
}

// 
function InsertHtml(pUrl, pID) {
	var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	xmlhttp.Open("get", pUrl, false);
	xmlhttp.Send();
	GetObj(pID).innerHTML = unescape(xmlhttp.responseText)
}

// 
function ClientFormPost(pFormName, pShowBox, pBoxWidth, pBoxHeight) { // 
	
	
	var xmlhttp = createobj();
	var userInfo = getFormValue(pFormName);
	userInfo = encodeURI(userInfo);
    //userInfo = encodeURI(userInfo);
	
	
	userInfo=userInfo.returnRegExp();
	
	xmlhttp.open("Post", pFormName.action, false);
	
	xmlhttp.setrequestheader("Content-Type","application/x-www-form-urlencoded;charset=Utf-8");
	  
	xmlhttp.send(userInfo);
	if (pShowBox == "1") {
		//  alert(xmlhttp.responseText);
		sAlert(unescape(xmlhttp.responseText), pBoxWidth, pBoxHeight);
		
	}
}

String.prototype.rExp = function(a1, a2)
{
var reg = new RegExp(a1, "g"); 
    return this.replace(reg, a2); 
}

String.prototype.returnRegExp = function()
{
var str = this;
str = str.rExp("\\+", "%2B"); 
str = str.rExp("%F7", escape("&divide;")); 
str = str.rExp("%B1", escape("&plusmn;")); 
str = str.rExp("%D7", escape("&times;")); 
str = str.rExp("%A9", escape("&copy;")); 
str = str.rExp("%AE", escape("&reg;")); 
str = str.rExp("%B7", escape("&middot;")); 
str = str.rExp("%A3", escape("&pound;")); 
str = str.rExp("%u2122", escape("&#8482;"));

return str;
}


//
function ClientUrlGet(pUrl, pShowBox, pBoxWidth, pBoxHeight) {
	var xmlhttp = createobj();
	xmlhttp.Open("get", pUrl, false);
	xmlhttp.Send();
	if (pShowBox == "1") {
		sAlert(unescape(xmlhttp.responseText), pBoxWidth, pBoxHeight);
	}
}



//
function SetCookie(name, value)// }
{
	var Days = 30; // 
	var exp = new Date(); // new Date("December 31, 9998");
	exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
	document.cookie = name + "=" + escape(value) + ";expires="
			+ exp.toGMTString();
}
function getCookie(name)// 
{
	var arr = document.cookie
			.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)"));
	if (arr != null)
		return unescape(arr[2]);
	return null;
}
function delCookie(name)// 
{
	var exp = new Date();
	exp.setTime(exp.getTime() - 1);
	var cval = getCookie(name);
	if (cval != null)
		document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
}

// 
//
function getFormValue(pFormName) {
	var tempName="";
	var tempValue=""
	var tempString="";
	
	
	var tempForm=pFormName;

	for(i=0;i<tempForm.length;i++){
		tempName=escape(tempForm[i].name);
		tempValue="";
		if(tempForm[i].type=="text"||tempForm[i].type=="select-one"||tempForm[i].type=="hidden"||tempForm[i].type=="textarea"||tempForm[i].type=="botton"||tempForm[i].type=="password"){
			tempValue=escape(tempForm[i].value);
			
			if (tempString=="") {
				tempString   +=tempForm[i].name+"="+tempValue;
			}else{
				tempString   +="&"+tempForm[i].name+"="+tempValue;  
			}
				
		}else if(tempForm[i].type=="radio"){
			if(tempForm[i].checked){
				tempValue=escape(tempForm[i].value);
				
				if (tempString=="") {
					tempString   +=tempForm[i].name+"="+tempValue;
				}else{
					tempString   +="&"+tempForm[i].name+"="+tempValue;  
				}
			}
		}else if(tempForm[i].type=="checkbox"){
			if(tempForm[i].checked){
				tempValue=escape(tempForm[i].value);
				
				
				if (tempString=="") {
					tempString   +=tempForm[i].name+"="+tempValue;
				}else{
					tempString   +="&"+tempForm[i].name+"="+tempValue;  
				}
				
			}
		}else if(tempForm[i].type=="select-multiple"){
			tempValue="";
			var optionLen=new Number();
			optionLen=tempForm[i].options.length
			for(var j=0;j<optionLen;j++) {
				var checkValue=new String();
				checkValue="";
				if (tempForm[i].options[j].selected) checkValue=tempForm[i].options[j].value
				if(checkValue==""){
				}else{
					if (tempValue==""){
						tempValue+=escape(checkValue);
					}else{
						tempValue+=","+escape(checkValue);
					}
				}
			}
			
				
			if (tempString=="") {
				tempString   +=tempForm[i].name+"="+tempValue;
			}else{
				tempString   +="&"+tempForm[i].name+"="+tempValue;  
			}
		}
	}
	return tempString;
}


//
function FitWhere(pFormName) {
	window.location.href = pFormName.action + FitWhereStr(pFormName);
}

//
function FitWhereStr(pFormName) {
	var tempName = "";
	var tempValue = ""
	var tempString = "";
	var tempCondValue = "";

	var tempForm = pFormName;

	for (i = 0; i < tempForm.length; i++) {
		tempName = escape(tempForm[i].name);
		tempValue = "";
		if (tempName.indexOf("MrpCond") < 0) { //
			// 
			if (GetObj(tempName + "MrpCond")) {// 
				tempCondValue = GetObj(tempName + "MrpCond").value;
			} else {
				tempCondValue = "*";
			}
			if (tempForm[i].type == "text" || tempForm[i].type == "select-one"
					|| tempForm[i].type == "hidden"
					|| tempForm[i].type == "textarea"
					|| tempForm[i].type == "botton"
					|| tempForm[i].type == "password") {
				tempValue = escape(tempForm[i].value);

				if (tempString == "") {
					tempString += "@" + tempForm[i].name + "=" + tempCondValue
							+ tempValue;
				} else {
					tempString += ";" + "@" + tempForm[i].name + "="
							+ tempCondValue + tempValue;
				}

			} else if (tempForm[i].type == "radio") {
				if (tempForm[i].checked) {
					tempValue = escape(tempForm[i].value);

					if (tempString == "") {
						tempString += "@" + tempForm[i].name + "="
								+ tempCondValue + tempValue;
					} else {
						tempString += ";" + "@" + tempForm[i].name + "="
								+ tempCondValue + tempValue;
					}
				}
			} else if (tempForm[i].type == "checkbox") {
				if (tempForm[i].checked) {
					tempValue = escape(tempForm[i].value);

					if (tempString == "") {
						tempString += "@" + tempForm[i].name + "="
								+ tempCondValue + tempValue;
					} else {
						tempString += ";" + "@" + tempForm[i].name + "="
								+ tempCondValue + tempValue;
					}

				}
			} else if (tempForm[i].type == "select-multiple") {
				tempValue = "";
				var optionLen = new Number();
				optionLen = tempForm[i].options.length
				for ( var j = 0; j < optionLen; j++) {
					var checkValue = new String();
					checkValue = "";
					if (tempForm[i].options[j].selected)
						checkValue = tempForm[i].options[j].value
					if (checkValue == "") {
					} else {
						if (tempValue == "") {
							tempValue += escape(checkValue);
						} else {
							tempValue += "," + escape(checkValue);
						}
					}
				}

				if (tempString == "") {
					tempString += "@" + tempForm[i].name + "=" + tempCondValue
							+ tempValue;
				} else {
					tempString += ";" + "@" + tempForm[i].name + "="
							+ tempCondValue + tempValue;
				}
			}
		}
	}
	return tempString;
}

function sAlert(str, msgw, msgh) {
	var bordercolor;
	titleheight = 25 // 
	bordercolor = "#336699";// 
	titlecolor = "#99CCFF";//

	var sWidth, sHeight, sWindowHeight, sScreenHeight;
	sWidth = document.body.clientWidth;// 
	sHeight = document.body.clientHeight;// 
	sWindowHeight = document.documentElement.scrollTop;// 
	sScreenHeight = window.screen.availHeight;

	var bgObj = document.createElement("div");//
	// <div id="bgDiv" style="position:absolute; top:0; background-color:#777;
	// filter:progid:DXImagesTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75);
	// opacity:0.6; left:0; width:918px; height:768px; z-index:10000;"> </div>
	bgObj.setAttribute("id", "bgDiv");
	bgObj.style.position = "absolute";
	bgObj.style.top = "0";
	bgObj.style.background = "#777";
	bgObj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75);";
	bgObj.style.opacity = "0.6";
	bgObj.style.left = "0";
	bgObj.style.width = sWidth + "px";
	bgObj.style.height = sScreenHeight + "px";
	bgObj.style.zIndex = "10000";

	var msgObj = document.createElement("div")// 
	// <div id="msgDiv" align="center" style="background-color:white; border:1px
	// solid #336699; position:absolute; left:50%; top:50%; font:12px/1.6em
	// Verdana,Geneva,Arial,Helvetica,sans-serif; margin-left:-225px;
	// margin-top:npx; width:400px; height:100px; text-align:center;
	// line-height:25px; z-index:100001;"> </div>
	msgObj.setAttribute("id", "msgDiv");
	msgObj.setAttribute("align", "center");
	msgObj.style.background = "white";
	msgObj.style.border = "1px   solid  " + bordercolor;
	msgObj.style.position = "absolute";
	msgObj.style.left = (sWidth - msgw) / 2;
	msgObj.style.top = sWindowHeight + (sScreenHeight - msgh) / 2;
	msgObj.style.font = "12px/1.6em   Verdana,   Geneva,   Arial,   Helvetica,   sans-serif";
	// msgObj.style.marginLeft = "-225px" ;
	// msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
	msgObj.style.width = msgw + "px";
	msgObj.style.height = msgh + "px";
	msgObj.style.textAlign = "left";
	msgObj.style.lineHeight = "25px";
	msgObj.style.zIndex = "10001";
	// alert("***********")

	var title = document.createElement("h4");//
	// <h4 id="msgTitle" align="right" style="margin:0; padding:3px;
	// background-color:#336699;
	// filter:progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20,
	// finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);
	// opacity:0.75; border:1px solid #336699; height:18px; font:12px
	// Verdana,Geneva,Arial,Helvetica,sans-serif; color:white; cursor:pointer;"
	// onclick=""></h4>
	title.setAttribute("id", "msgTitle");
	title.setAttribute("align", "right");
	title.style.margin = "0";
	title.style.padding = "3px";
	title.style.background = bordercolor;
	title.style.filter = "progid:DXImageTransform.Microsoft.Alpha(startX=20,startY=20,finishX=100,finishY=100,style=1,opacity=75,finishOpacity=100);";
	title.style.opacity = "0.75";
	title.style.border = "1px   solid  " + bordercolor;
	title.style.height = "18px";
	// title.style.font="12px,Verdana,Geneva,Arial,Helvetica,sans-serif";
	title.style.color = "white";
	title.style.cursor = "pointer";
	title.innerHTML = "关闭";
	title.onclick = removeObj;

	var txt = document.createElement("p");//
	// <p style="margin:1em 0;" id="msgTxt"> </p>
	// txt.style.margin="1em 0"
	txt.setAttribute("id", "msgTxt");
	txt.style.padding = "5px";
	txt.innerHTML = str;// 

	var regExp = /<script.*>(.*)<\/script>/gi;
	if (regExp.test(txt.innerHTML)) {
		eval(RegExp.$1);
	}

	document.body.appendChild(bgObj);//
	document.body.appendChild(msgObj);//
	document.getElementById("msgDiv").appendChild(title);//
	document.getElementById("msgDiv").appendChild(txt);//

	function removeObj() {// 
		document.body.removeChild(bgObj);// 
		document.getElementById("msgDiv").removeChild(title);// 
		document.body.removeChild(msgObj);//
	}
}

function GetObj(objName) {
	if (document.getElementById) {
		return eval('document.getElementById("' + objName + '")')
	} else {
		return eval('document.all.' + objName)
	}
}




function doChange(objText, objDrop) {
	if (!objDrop)
		return;
	var str = objText.value;
	var arr = str.split("|");
	var nIndex = objDrop.selectedIndex;
	objDrop.length = 1;
	for ( var i = 0; i < arr.length; i++) {
		objDrop.options[objDrop.length] = new Option(arr[i], arr[i]);
	}
	objDrop.selectedIndex = nIndex;
}

function showUploadDialog(s_Type, s_Link, s_Thumbnail,s_Cusdir){
	if (s_Cusdir=="") {s_Cusdir="Guest"};
	var arr = showModalDialog("../htmledit/dialog/i_upload.htm?style=usercenter&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail+"&cusdir="+s_Cusdir, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
}


function CheckAll(name, checkname) {
	var status = 1;
	if (document.getElementById(checkname).checked == 0) {
		status = 0;
	}
	var e = document.getElementsByName(name);
	for ( var i = 0; i < e.length; i++) {
		e[i].checked = status;
	}
}


function ChangeFontSize(pDivIDName, pFontSize) {
	var lArticleContent = document.getElementById(pDivIDName);
	if (lArticleContent) {
		document.getElementById(pDivIDName).style.fontSize = pFontSize + "px";
	}
}

function addFavorite(pUrl, pName) {
	try { 
        window.external.addFavorite(pUrl, pName); 
    } catch (e) { 
        try { 
            window.sidebar.addPanel(pName, pUrl, ""); 
        } catch (e) { 
            alert("加入收藏失败,请手动添加."); 
		}
    } 

	
	/*window.external.addFavorite(pUrl, pName);
	return false;*/
}

function addBookmark(pUrl, pName) {
	try { 
        window.external.addFavorite(pUrl, pName); 
    } catch (e) { 
        try { 
            window.sidebar.addPanel(pName, pUrl, ""); 
        } catch (e) { 
            alert("加入收藏失败,请手动添加."); 
		}
    } 
	
	/*window.external.addFavorite(pUrl, pName);
	return false;*/
}

function setHomePage(pUrl) {
	this.document.body.style.behavior='url(#default#homepage)';
	this.document.body.setHomePage(pUrl);	

/*	document.body.style.behavior = 'url(#default#homepage)';
	document.body.setHomePage(pUrl);
	return false;
*/
}

function menu_action(sender) {
	var lis = sender.getElementsByTagName("li");
	for ( var key in lis) {
		lis[key].onmouseover = onMouseOver;
		lis[key].onMouseDown = onMouseDown;
		lis[key].onMouseUp = onMouseUp;
		lis[key].onmouseout = onMouseOut;
	}
	sender.onmouseover = null;
}
function onMouseOver() {
	OnMouse(this, "block")
}
function onMouseDown() {
	OnMouse(this, "block")
}
function onMouseUp() {
	OnMouse(this, "none")
}
function onMouseOut() {
	OnMouse(this, "none")
}
function OnMouse(Obj, Display) {
	var ul = Obj.getElementsByTagName("ul")[0];
	if (ul != null) {
		ul.style.display = Display;
	}
}


function selectTag(tags, tagContent, showContent, selfObj) {
	var tag = document.getElementById(tags).getElementsByTagName("li");
	var taglength = tag.length;
	for (i = 0; i < taglength; i++) {
		tag[i].className = "";
	}
	selfObj.parentNode.className = "selectTag";

	for (i = 0; j = document.getElementById(tagContent + i); i++) {
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
}

function strlen(str) {
	var len;
	var i;
	len = 0;

	for (i = 0; i < str.length; i++) {
		if (str.charCodeAt(i) > 255)
			len += 2;
		else
			len++;
	}

	return len;
}

function checkIsInteger(str) {
	if (str == "")
		return false;
	if (str.search(/^[0-9]+$/) < 0)
		return false;
	else
		return true;
}

function checkValidPasswd(str) {
	var reg = /^[\x00-\x7f]+$/;
	if (!reg.test(str)) {
		return false;
	}

	if (str.length < 6 || str.length > 16) {
		return false;
	}

	return true;
}

function checkIsMobile(str) {
	if (str.search(/^1[35][0-9]{9}$/) >= 0)
		return true;
	else
		return false;
}

function isChn(str) {
	var reg = /^[\u4E00-\u9FA5]+$/;
	if (!reg.test(str)) {
		return false;
	}

	return true;
}
function isValidTrueName(strName) {
	var str = Trim(strName);

	var reg = /^[A-Z \u4E00-\u9FA5]+$/;
	if (reg.test(str)) {
		return true;
	}

	return false;
}

function isValidName(strName) {
	var str = Trim(strName);

	var reg = /^[A-Za-z \u4E00-\u9FA5]+$/;
	if (reg.test(str)) {
		return true;
	}

	return false;
}

function isDate(Date) {
	var datetime = Date;
	var year, month, day;

	if (Date.search(/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/) < 0) {
		return false;
	}

	year = datetime.substring(0, 4);
	if (parseInt(year, 10) < 1000) {
		return false;
	}

	month = datetime.substring(5, 7);
	if (parseInt(month, 10) < 1 || parseInt(month, 10) > 12) {
		return false;
	}

	day = datetime.substring(8, 10);
	if (parseInt(day, 10) < 1 || parseInt(day, 10) > 31) {
		return false;
	}

	return true;
}

function isPostalCode(s) {
	var patrn = /^[a-zA-Z0-9 ]{3,12}$/;
	if (!patrn.exec(s))
		return false
	return true
}

function checkMail(str) {
	var myReg = /^[_\-\.a-zA-Z0-9]+@([_\-a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/;
	if (myReg.test(str))
		return true;

	return false;
}

function checkIsTelePhone(str) {
	if (str.search(/^[-0-9]+$/) >= 0)
		return true;
	else
		return false;
}
function checkIdCard(str) {
	if (str.search(/^[0-9]+[Xx]*$/) >= 0 || checkHkId(str))
		return true;
	else
		return false;
}








function checkPasswd(passwd) {

	return "true";
}

function jump(surl) {
	surl = surl.replace(/=&/g, '%3d&'); //
	surl = surl.replace(/==&/g, '%3d&'); //
	if (surl == "back") {
		history.back(-1);
		return;
	} else if (surl == "close") {
		self.close();
		return;
	}

	// window.location.href= surl;
	location.replace(surl)

	return;
}

/*
 * ==================================================================
 * ==================================================================
 */
function LTrim(str) {
	var whitespace = new String(" \t\n\r");
	var s = new String(str);

	if (whitespace.indexOf(s.charAt(0)) != -1) {
		var j = 0, i = s.length;
		while (j < i && whitespace.indexOf(s.charAt(j)) != -1) {
			j++;
		}
		s = s.substring(j, i);
	}
	return s;
}

/*
 * ==================================================================
 * ==================================================================
 */
function RTrim(str) {
	var whitespace = new String(" \t\n\r");
	var s = new String(str);

	if (whitespace.indexOf(s.charAt(s.length - 1)) != -1) {
		var i = s.length - 1;
		while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) {
			i--;
		}
		s = s.substring(0, i + 1);
	}
	return s;
}

function TrimInputValue(inpobj) {
	inpobj.value = Trim(inpobj.value);
}
function Trim(str) {
	return RTrim(LTrim(str));
}

function TrimForm(form) {
	if (!form) {
		return;
	}

	for ( var i = 0; i < form.length; i++) {
		if (form.elements[i].type.toUpperCase() == "TEXT") {
			form.elements[i].value = Trim(form.elements[i].value);
		}
	}
}

function changeStyle( len, currentNum, idValue,contentId,stateValue){
	
	if( idValue != "" && stateValue != ""){
		for( var i = 0; i < len; i++ ){
			var currentId = idValue + i;
			if( currentNum == i ){
				document.getElementById(currentId).className=stateValue;
			}
			else{
				document.getElementById(currentId).className="";
			}
		}
	}
	
	if(contentId!=""){
		for( var i = 0; i < len; i++ ){
			var currentContentId = contentId + i;
			if( currentNum == i ){
				document.getElementById(currentContentId).style.display="block";
			}
			else{
				document.getElementById(currentContentId).style.display="none";
			}
		}
	}
}




//检查安装了播放器没有
function MrpVideoPlay(MeropUrl){ 
	var MeropPlaySoftObj;
	try{
		MeropPlaySoftObj=new ActiveXObject("Merop_InstallCheck.InstallCheck");//创建对象
		MeropPlaySoftObj.player_params = MeropUrl;
		MeropPlaySoftObj.start_player();
		sAlert("友情提醒：由于在线人数较多，提示连接服务器失败，请多试几次。如果始终播放不了，请与网站管理员联系。",'300','130');
	}catch(e){
		sAlert('您可能没有安装播放平台，请<a href=http://www.old.jssjys.com/meropsoft/softdown.asp onclick=removeObj><font color=#FF0000>下载</font></a>安装。','300','130');
	}
	delete MeropPlaySoftObj;
	MeropPlaySoftObj = null;
}