function showMsg(){
	//document.write('<div id="divMsg" style="position:absolute; left:11px; top:15px; width:264px; height:203px; z-index:1">小提示</div>');
	window.open("/member/msgDetail.asp","msgwin", 'width=550,height=600, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no')
}
function msgPop(url){
	window.open(url,"winpop", 'width=580,height=480, left=10, top=10, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no');
}
//window function
function ShowDialog(url, width, height) {
	window.showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
	//showModalDialog创建一个显示指定 HTML 文档的模式对话框。
}
function winpop(url,width,height){
	window.open(url,"winpop", 'width='+ width + ',height=' + height +', left=10, top=10, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no')
}
function openNotice(intID){
	window.open("/member/notice.asp?id=" + intID,"winpop", 'width=550,height=600, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no')
}
function goManage() {
	//window.showModelessDialog('manage.asp',window,'dialogWidth:800px;dialogHeight:600px;status:no;scroll:no;help:no;');
	window.open("admin/index.asp",null,"width=800,height=600,status=yes,toolbar=no,menubar=no,location=no");
	//window.resizeTo(800, 600);
}
function orderAds(params){
	var url = "/redirect.asp?" + params;
	var pop=new Popup({ contentType:1, isReloadOnClose:false, width:530, height:600 });
	pop.setContent("title","广告定制");
	pop.setContent("contentUrl",url);
	pop.build();
	pop.show();
	return;
}
function queryCatRank(sCatType,sKey){//按分类查询排名
	if(document.getElementById(sKey) == "undefined" || document.getElementById(sKey) == null){
		alert("请选择分类");
		return;
	}else{
		//window.open("/rank/QueryCatRank.asp?CatType=" + sCatType + "&CatID=" + document.getElementById(sKey).value,"queryWin", 'width=550,height=600, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no');
		var url = "/rank/QueryCatRank.asp?CatType=" + sCatType + "&CatID=" + document.getElementById(sKey).value;
		var pop=new Popup({ contentType:1, isReloadOnClose:false, width:530, height:600 });
		pop.setContent("title","查询排名");
		pop.setContent("contentUrl",url);
		pop.build();
		pop.show();
		return;
	}
}
function queryRank(sType){//查询排名
	if(sType == "" || sType == null){
		alert("传入参数有误");
		return;
	}else{
		//window.open("/rank/QueryCatRank.asp?CatType=" + sType,"queryWin", 'width=550,height=600, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no');
	}
}
function getLostPass() {//跳转到获取密码的页
	//window.open("/member/password_find.asp","getpassWin", 'width=380,height=120, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no');
	var url = "/member/password_find.asp";
	var pop=new Popup({ contentType:1, isReloadOnClose:false, width:260, height:120 });
	pop.setContent("title","找回密码");
	pop.setContent("contentUrl",url);
	pop.build();
	pop.show();
	return;
}
function reportBug(sErrCode){//向网站技术人员报告错误
	//window.open("/_webmaster/reportBug.asp?type=" + sErrCode,"bugWin", 'width=550,height=600, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no');
	var url = "/_webmaster/reportBug.asp?type=" + sErrCode;
	var pop=new Popup({ contentType:1, isReloadOnClose:false, width:550, height:540 });
	pop.setContent("title","报告错误");
	pop.setContent("contentUrl",url);
	pop.build();
	pop.show();
	return;
}
function reportMsg(sMsg){
	window.open("/_webmaster/reportBug.asp?type=" + sMsg,"bugWin", 'width=550,height=600, left=0, top=0, resizable=0, status=no,scrollbars=no,toolbar=no,menubar=no,location=no')	
}
function readAgreement(){//阅读服务条款
	window.open("/aboutus/agreement.shtml",null,"width=800,height=600,status=yes,toolbar=no,menubar=no,location=no");
}
//提交表单
var ie
ie = (document.all)? true:false
if (ie){
function keyForms(eventobject){
	if(event.ctrlKey && window.event.keyCode==13){
		this.document.Gforms.submit();
		}
	}
}
function postMsg(){
	var o = event.srcElement;
	o.gvSubmit.value="正在提交...";
	o.gvSubmit.disabled=true;			
}

//checklogin
function checkspace(checkstr) {//检查是否有空格，返回一个Boolean值。
  return Boolean( /^\s*$/.test( checkstr ) );
}
/*登录验证2007-03-15*/
function checkLogin(oSrc) {
	if (oSrc.username.value==""){
		alert("用户名不能为空！");
		oSrc.username.select();
		oSrc.username.focus();
		return false;
	}
	if (oSrc.passwd.value==""){
		alert("密码不能为空！");
		oSrc.passwd.select();
		oSrc.passwd.focus();
		return false;
	}
	return true;
}

function check_login(oSrc){//主函数
	//用户名username *
	if (checkspace(oSrc.username.value)){
		alert("请填写您的用户名！");
		oSrc.username.focus();
		oSrc.username.select();
		return (false);
	}
	var filter=/^\s*[A-Za-z0-9_]{5,15}\s*$/;
	if (!filter.test(oSrc.username.value)) { 
		alert("用户名填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9 _ )长度不小于5个字符，不超过15个字符，注意不要使用空格。"); 
		oSrc.username.focus();
		oSrc.username.select();
		return (false); 
	} 

	//密码passwd *
	if (checkspace(oSrc.passwd.value)) {
		alert("请填写您的密码！");
		oSrc.passwd.focus();
		oSrc.passwd.select();
		return (false); 
	}
	var filter=/^\s*[A-Za-z0-9_]{5,15}\s*$/;
	if (!filter.test(oSrc.passwd.value)) { 
		alert("密码填写不正确,请重新填写！可使用的字符为（A-Z a-z 0-9 _)长度不小于5个字符，不超过15个字符，注意不要使用空格。"); 
		oSrc.passwd.focus();
		oSrc.passwd.select();
		return (false); 
	}
	return true;
}

//检验输放字数的多少
function textCounter(oInputContral,oTipsContral,maxlimit) { 
	if (oInputContral.value.length > maxlimit){
		alert("您输入的字数过多，点击确定将进行截字");
		oInputContral.value = oInputContral.value.substring(0, maxlimit); 
	}else{ 
		oTipsContral.value = oInputContral.value.length;
	}
}


// JavaScript Document
function ShowDialog(url, width, height) {
	window.showModalDialog(url, window, "dialogWidth:" + width + "px;dialogHeight:" + height + "px;help:no;scroll:no;status:no");
	//showModalDialog创建一个显示指定 HTML 文档的模式对话框。
}
function winpop(url,width,height){
window.open(url,"winpop", 'width='+ width + ',height=' + height +', left=300, top=200, resizable=0, status=no,scrollbars=yes,toolbar=no,menubar=no,location=no')
}

function PopupUploadPic(HndName){
	var UploadPicWnd=window.open("../common/UploadPic.asp?HndName="+HndName,"new","resizable=yes,width=580,height=320,top=0,scrollbars=no");
	if(UploadPicWnd.opener== null) 
	UploadPicWnd.opener = self;
	return (false);
}
function taggleMenu(oEl){
	//snowalk.h.d 2006.5.24
	//不用索引实现菜单切换
	var oDes = oEl.parentNode.children.item(1);
	//alert(oDes.className.className);
	if(oDes.style.display==''){
		oDes.style.display='none';
	}else{
		oDes.style.display='';
	}
}

function Ajax(Url)
{
	//alert(Url);
	//return
	var HTTP = new ActiveXObject("Microsoft.XMLHTTP");
	var ReturnValue=HTTP.open("POST", Url, false);
	HTTP.send("");
	return HTTP.responseText;
}


//2007-2-28 Snowalk
function clickT(u, param) {
    d = new Date();
    if(document.images) {
        (new Image()).src="/_wsp_app/stat/stat.asp" + param + "&time=" + d.getTime();
    }
    return true;
}
function clickAds(adsID) {
    d = new Date();
    if(document.images) {
        (new Image()).src="/adv/handler/stat.asp?adsID" + adsID + "&time=" + d.getTime();
    }
    return true;
}

