 
	
	function runEx()
	{var winEx = window.open("", "winEx", "width=300,height=200,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace"); winEx.document.write(unescape(event.srcElement.parentElement.children[2].value)); 
	 winEx.document.close(); 
	}
	tPopWait=50;tPopShow=7000;showPopStep=20;popOpacity=99;sPop=null;curShow=null;
	tFadeOut=null;tFadeIn=null;tFadeWaiting=null;
	document.write("<style type='text/css' id='defaultPopStyle'>");
	document.write(".cPopText {  background-color: #F4FAFF;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
	document.write("</style>");
	document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;display:none;' class='cPopText'></div>");
	function showPopupText()
		{var o=event.srcElement;MouseX=event.x;MouseY=event.y;
		if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
		if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
		if(o.dypop!=sPop){
			sPop=o.dypop;
			clearTimeout(curShow);clearTimeout(tFadeOut);clearTimeout(tFadeIn);clearTimeout(tFadeWaiting);
			if(sPop==null || sPop=="") {dypopLayer.innerHTML="";dypopLayer.style.filter="Alpha()";dypopLayer.filters.Alpha.opacity=0;}
			else {if(o.dyclass!=null) popStyle=o.dyclass 
		else popStyle="cPopText";
		curShow=setTimeout("showIt()",tPopWait);
	}}}
	function showIt(){dypopLayer.className=popStyle;dypopLayer.innerHTML=sPop;popWidth=dypopLayer.clientWidth;popHeight=dypopLayer.clientHeight;
	if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
	else popLeftAdjust=0;
	if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
	else popTopAdjust=0;
	dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;dypopLayer.style.filter="Alpha(Opacity=0)";fadeOut();
	}
	function fadeOut(){if(dypopLayer.filters.Alpha.opacity<popOpacity) {dypopLayer.filters.Alpha.opacity+=showPopStep;tFadeOut=setTimeout("fadeOut()",1);} else {dypopLayer.filters.Alpha.opacity=popOpacity;tFadeWaiting=setTimeout("fadeIn()",tPopShow);}}
	function fadeIn(){if(dypopLayer.filters.Alpha.opacity>0) {dypopLayer.filters.Alpha.opacity-=1;tFadeIn=setTimeout("fadeIn()",1);}}
	//document.onmouseover=showPopupText;

function openScript(url, width, height,condition)
 {var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ','+condition);}


function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }


function openw(values){
open1=window.open('','','resizable=1,scrollbars=1,menubar=0,toolbar=0,directories=0');
open1.document.open()
open1.document.write(values);
open1.document.close()
}

function runForumcode(obj){

var textsss=obj.innerText;
var winEx=window.open();
winEx.document.write(textsss); 
winEx.document.write("<script language=javascript>document.title=' 海天在线.Net论坛 —— 『 Html/Css/Dhtml/Javascript 』： '+ document.title<\/script>"); 
winEx.document.close();
winEx.focus();

}

function copyForumcode(obj){
obj.select();
objcopy=obj.createTextRange();
objcopy.execCommand("Copy");
}


//菜单
var menuOffX=0	//菜单距连接文字最左端距离
var menuOffY=14	//菜单距连接文字顶端距离

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all

function showmenu(e,vmenu,mod){
	which=vmenu
	menuobj=document.getElementById("popmenu")
	menuobj.thestyle=menuobj.style
	menuobj.innerHTML=which
	menuobj.contentwidth=menuobj.offsetWidth
	eventX=e.clientX
	eventY=e.clientY
	var rightedge=document.body.clientWidth-eventX
	var bottomedge=document.body.clientHeight-eventY
	var getlength
		if (rightedge<menuobj.contentwidth){
			getlength=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth+menuOffX : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
		}else{
			getlength=ie4? ie_x(event.srcElement)+menuOffX : ns6? window.pageXOffset+eventX : eventX
		}
		menuobj.thestyle.left=getlength+'px'
		if (bottomedge<menuobj.contentheight&&mod!=0){
			getlength=ie4? document.body.scrollTop+eventY-menuobj.contentheight-event.offsetY+menuOffY-23 : ns6? window.pageYOffset+eventY-menuobj.contentheight-10 : eventY-menuobj.contentheight
		}	else{
			getlength=ie4? ie_y(event.srcElement)+menuOffY : ns6? window.pageYOffset+eventY+10 : eventY
		}
	menuobj.thestyle.top=getlength+'px'
	menuobj.thestyle.visibility="visible"
}

function ie_y(e){  
	var t=e.offsetTop;  
	while(e=e.offsetParent){  
		t+=e.offsetTop;  
	}  
	return t;  
}  
function ie_x(e){  
	var l=e.offsetLeft;  
	while(e=e.offsetParent){  
		l+=e.offsetLeft;  
	}  
	return l;  
}  

function highlightmenu(e,state){
	if (document.all)
		source_el=event.srcElement
	else if (document.getElementById)
		source_el=e.target
	if (source_el.className=="menuitems"){
		source_el.id=(state=="on")? "mouseoverstyle" : ""
	}
	else{
		while(source_el.id!="popmenu"){
			source_el=document.getElementById? source_el.parentNode : source_el.parentElement
			if (source_el.className=="menuitems"){
				source_el.id=(state=="on")? "mouseoverstyle" : ""
			}
		}
	}
}

function hidemenu(){if (window.menuobj)menuobj.thestyle.visibility="hidden"}
function dynamichide(e){if ((ie4||ns6)&&!menuobj.contains(e.toElement))hidemenu()}

document.onclick=hidemenu
document.write("<div class=menuskin id=popmenu onmouseover=highlightmenu(event,'on') onmouseout=highlightmenu(event,'off');dynamichide(event)></div>")
// 菜单END

var levelname, levelimage;

function level(experience,membercode)
{
	
if (membercode=='0'){levelname="尚未激活";levelimage="<img src=/club/pic/level0.gif>";}
else
if (membercode=='19'){levelname="版 主";levelimage="<img src=/club/pic/level15.gif>";}
else
if (membercode=='20'){levelname="总版主";levelimage="<img src=/club/pic/level16.gif>";}
else
if (membercode=='21'){levelname="管理员";levelimage="<img src=/club/pic/level17.gif>";}
else
if (experience< 50){levelname="实习生";levelimage="<img src=/club/pic/level1.gif>";}
else
if (experience< 100){levelname="理货员";levelimage="<img src=/club/pic/level2.gif>";}
else
if (experience< 200){levelname="柜组长";levelimage="<img src=/club/pic/level3.gif>";}
else
if (experience< 400){levelname="部门经理";levelimage="<img src=/club/pic/level4.gif>";}
else
if (experience< 800){levelname="店长";levelimage="<img src=/club/pic/level5.gif>";}
else
if (experience< 1500){levelname="地区经理";levelimage="<img src=/club/pic/level6.gif>";}
else
if (experience< 3000){levelname="大区经理";levelimage="<img src=/club/pic/level7.gif>";}
else
if (experience< 6000){levelname="总监";levelimage="<img src=/club/pic/level8.gif>";}
else
if (experience< 12000){levelname="副总经理";levelimage="<img src=/club/pic/level9.gif>";}
else
if (experience< 20000){levelname="总经理";levelimage="<img src=/club/pic/level10.gif>";}
else
if (experience< 30000){levelname="副总裁";levelimage="<img src=/club/pic/level11.gif>";}
else
if (experience< 40000){levelname="总裁";levelimage="<img src=/club/pic/level12.gif>";}
else
if (experience< 50000){levelname="副董事长";levelimage="<img src=/club/pic/level13.gif>";}
else
if (experience< 60000){levelname="董事长";levelimage="<img src=/club/pic/level14.gif>";}
else
if (experience>= 60000){levelname="元老";levelimage="<img src=/club/pic/level15.gif>";}
return('');
}

//图片自动调整的模式，1为按比例调整 ，2 按大小调整。
	var resizemode=2
function imgresize(o){
	 	if (resizemode==2 || o.onmousewheel){
	 		if(o.width > 500 ){
				o.style.width='500px';
			}
			if(o.height > 800){
				o.style.height='800px';
			}
		}else{
		var parentNode=o.parentNode.parentNode
		if (parentNode){
		if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='98%';
		}else{
		var parentNode=o.parentNode
		if (parentNode){
			if (o.offsetWidth>=parentNode.offsetWidth) o.style.width='98%';
			}
		}
	}
	}
function bbimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}
