<!--
      	function mOvr(src,clrOver) {
	 if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand'; 
	  src.bgColor = clrOver;
	 }
	}
	function mOut(src,clrIn) {
	 if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default'; 
	  src.bgColor = clrIn;
	 }
	} 
	function MM_findObj(n, d) { //v3.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf('?'))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
	}
	
	function MM_showHideLayers() { //v3.0
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	    obj.visibility=v; }
	}


	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf('#')!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}	
	
	function ISIE() {
		var bAppName = window.navigator.appName;
		if (bAppName.indexOf('Explorer') >= 0)
			return true; 
		else return false; 
	}

	function getrid(){
		var frm = window.top.frames;

//		window.oldError=window.onerror;
//		window.onerror=function (err, url, lineNo) {
//			return false;
// 	}
 
		if (frm != null){
			var i = 0;
	    	for (i=0;i<frm.length;i++){
    			if (frm(i).name == 'topFrame'){
    				if (frm(i).rid)
        				return frm(i).rid;
        			break;
        		}
//		        window.onerror=window.oldError;
      		}
		}
		return 0;
	}

	//参数：
	//	url 链接地址
	//	target 目标frame，其中
	//		_top:表示主frame
	//		_blank:新窗口
	function openurl(url,target){
		var rid = 0;
		if (target!='_loyu'){
			if (ISIE()){
				var localhref=window.location.href;
				if (localhref.indexOf('tctz.chinaef.com',0)!=-1||localhref.indexOf('www.tctznet.com',0)!=-1)
//					alert(localhref);
					rid = readCookie('chinaef_runid');
				else{
					rid = getrid();
				}
			}
			var num=openurl.arguments.length;
	
			if (num==1 || target==''){
				target='mainFrame';
			}
			
			if (url.indexOf('?',0)==-1){
				url=url+'?rid='+rid;
			}else{
				url=url+'&rid='+rid;
			}
		}
		else
			target='_blank2';
		if (target=='_top'){
			parent.location=url;
		}else if (target=='_blank'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=550,height=430');
			newwin.location=url;
			newwin.focus();
		}else if (target=='_blank1'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=650,height=430');
			newwin.location=url;
			newwin.focus();
		}else if (target=='_blank2'){
			var newwin = window.open('','_blank','toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,left=0,top=0');
			newwin.location=url;
			newwin.focus();
		}else if (target=='_blank3'){
			var newwin = window.open('','_blank','scrollbars=no,resizable=no,left=0,top=0,width=790,height=550');
			newwin.location=url;
			newwin.focus();
		}else if (target=='chatroom'){
			var newwin = window.open('','searchWin','scrollbars=no,resizable=no,left=0,top=0,width=790,height=550');
			newwin.location=url;
			newwin.focus();
		}else if (target=='newform'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=650,height=430');
			newwin.location=url;
			newwin.focus();
		}else{
			if (parent.frmaes != null){
				parent.frames(target).location=url;
			}else{
				this.location=url;
			}
		}
		return;
	}
	
	//以下两程序取新闻评论的rid
	function getrid1(){
		localhref=window.location.href;
		strrid=localhref.indexOf('rid');
		rid1=localhref.substring(strrid+4);
		return rid1;
	}
	
	function openurl1(url,target){
		var rid = 0;
		if (ISIE()){
			rid =getrid1();
		}
		var num=openurl1.arguments.length;

		if (num==1 || target==''){
			target='mainFrame';
		}
		
		if (url.indexOf('?',0)==-1){
			url=url+'?rid='+rid;
		}else{
			url=url+'&rid='+rid;
		}
		
		if (target=='_top'){
			parent.location=url;
		}else if (target=='_blank'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=550,height=430');
			newwin.location=url;
			newwin.focus();
		}else{
			if (parent.frmaes != null){
				parent.frames(target).location=url;
			}else{
				this.location=url;
			}
		}
		return;
	}
	
	function openurl2(url,target){
		var rid = 0;
		if (ISIE()){
			rid = getrid1();
		}
		var num=openurl2.arguments.length;

		if (num==1 || target==''){
			target='mainFrame';
		}
		
		if (url.indexOf('?',0)==-1){
			url=url+'?rid='+rid;
		}else{
			url=url+'&rid='+rid;
		}
		
		if (target=='_top'){
			parent.location=url;
		}else if (target=='_blank'){
			var newwin = window.open('','formsp','scrollbars=1,resizable=1,left=0,top=0,width=550,height=430');
			newwin.location=url;
			newwin.focus();
		}else if (target=='newform'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=650,height=430');
			newwin.location=url;
			newwin.focus();
		}else{
			if (parent.frmaes != null){
				parent.frames(target).location=url;
			}else{
				this.location=url;
			}
		}
		return;
	}

	function openWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}
	
	
/*
	function setCookie(name,runid){
		var the_cookie = name+"=runid:" + escape(runid);
		var today = new Date();
		var time = new Date(today.getYear(),today.getMonth(),today.getDate(),today.getHours(),today.getMinutes()+1,today.getSeconds());
	    var the_cookie_date = time.toGMTString();
		the_cookie = the_cookie + ";expires=" + the_cookie_date;
		document.cookie = the_cookie;
	}
*/
	function readCookie(name){
	  var the_cookie = "";
	  if(document.cookie != '')
	  		the_cookie = unescape(WM_getCookieValue(name));
	  var broken_cookie = the_cookie.split(":");
	  var the_runid_part = broken_cookie[1];
	  var broken_runid = the_runid_part.split(";");
	  var the_runid = broken_runid[0];
//	  alert("runid is: " + unescape(the_runid));
	  return the_runid;
	}
	
	function WM_getCookieValue(name){
		var firstChar, lastChar;
		var theBigCookie = document.cookie;
		firstChar = theBigCookie.indexOf(name);
		if(firstChar != -1){
			firstChar += name.length + 1;
			lastChar = theBigCookie.indexOf(';', firstChar);
			if(lastChar == -1)
				lastChar = theBigCookie.length;
			return theBigCookie.substring(firstChar, lastChar);
		}
		else{
			return 0;
		}
	}
//-->

