
//<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
//=================公用函数===========================


function HDhtmlencode(str)
{
	if (str!='')
	{	
		str=str.replace(/ /gi,"&nbsp;")
		//str=str.replace(/>/gi,"&#62;")
		//str=str.replace(/</gi,"&#60;")
		str=str.replace("/","&#47;")
		str=str.replace(/\r/gi,"")
		str=str.replace(/\n/gi,"")
		str=str.replace(/\'/gi,"&#39;")
		str=str.replace(/\"/gi,'&#34;')
		str=str.replace(/'/gi,"&#39;")
		str=str.replace(/"/gi,'&#34;')
		str=str.replace(/\r\n/g,"\\n\"\n+\"");
	}
	else
	{
		str='';
	}return(str);
}


// Flash Image Extension for Dreamwever ,by Yichun Yuan(dezone@sina.com)



//---------------淡入淡出效果-----------------------------



function nereidFade(object, destOp, rate, delta){
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;
    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
//---------------------------------------------------------------------------

<!--
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];}}
}
//MM_preloadImages('../images/bg1.jpg','../images/menu1.gif','../images/menu2.gif','../images/menu3.gif','../images/menu4.gif','../images/menu5.gif');
//-->


//----------------------dreamweaver对层的自动生成的代码-------------------------
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers_1() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers_1.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 load_flash(pSrc,pWidth,pHeight){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+pWidth+"\" height=\""+pHeight+"\">\n"
+"  <param name=\"movie\" value=\""+pSrc+"\">\n"
+"  <param name=\"quality\" value=\"high\">\n"
+"<PARAM NAME=\"wmode\" VALUE=\"Transparent\">\n"
+"  <embed src=\""+pSrc+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+pWidth+"\" height=\""+pHeight+"\"></embed>\n"
+"</object>");

}
function load_flash_notran(pSrc,pWidth,pHeight){
document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+pWidth+"\" height=\""+pHeight+"\">\n"
+"  <param name=\"movie\" value=\""+pSrc+"\">\n"
+"  <param name=\"quality\" value=\"high\">\n"
+"  <embed src=\""+pSrc+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+pWidth+"\" height=\""+pHeight+"\"></embed>\n"
+"</object>");

}
function load_flash_v2(pSrc,pWidth,pHeight){
	document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+pWidth+"\" height=\""+pHeight+"\">\n"
+"  <param name=\"movie\" value=\""+pSrc+"\">\n"
+"  <param name=\"quality\" value=\"high\">\n"
+"<param name=\"SCALE\" value=\"exactfit\">\n"
+"<PARAM NAME=\"wmode\" VALUE=\"Transparent\">\n"
+"  <embed src=\""+pSrc+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+pWidth+"\" height=\""+pHeight+"\"></embed>\n"
+"</object>");
}
//-----------------在屏幕中间弹出新窗口----------------------
//使用方法center("网页url","新窗口名称","宽度"，"高度"，"yes/no");
function HDcenter(mypage, myname, w, h, scroll) { 
	var winl = (screen.width - w) / 2; 
	var wint = (screen.height - h) / 2 -20; 
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,toolbar=no' 
	win = window.open(mypage, myname, winprops) 
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } 
	//return win;
}

function openAny( url , name , xs, ys ){
	//alert (xs);
	//alert (yx);
	window.open(url ,name,"location=no, directories=no,resizable=no, status=no, toolbar=no, menubar=no, width="+xs+" , height="+ys+", scrollbars=no"); 
}   


function ListNews_div(pWidth,pHeight,pTitle,pLink,pBorderColor,pAddTime,pPpaddingtop,pPaddingleft){
		if (pAddTime !="" && pAddTime != null){
			pAddTime = "--"+pAddTime;
			}
		document.write("<div style=\"border-bottom:1px dashed "+pBorderColor+"; height:"+pHeight+"; padding-top:"+pPpaddingtop+"px;padding-left:"+pPaddingleft+"px; width:"+pWidth+"\"><li></li><a href=\""+pLink+"\" target='_blank'>"+pTitle+"</a>&nbsp;&nbsp;<font color='#999999'>"+pAddTime+"</font></div>");
	}
	
function Circle_border1(pColor1,pColor2){
	document.write("<table cellpadding=0 cellspacing=0 border=0 width='100%'>"+
        "  <tr height=2> "+
         "   <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor1+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=2 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
         "   <td bgcolor="+pColor2+"  width=100%></td>"+
          "  <td width=2 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor1+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
       "   </tr>"+
         " <tr height=1> "+
         "   <td rowspan=3></td>"+
         "   <td bgcolor="+pColor1+"></td>"+
         "   <td colspan=3 bgcolor="+pColor2+" width=100%></td>"+
         "   <td bgcolor="+pColor1+"></td>"+
         "   <td rowspan=3></td>"+
         " </tr>"+
         " <tr height=1> "+
         "   <td rowspan=2></td>"+
         "   <td bgcolor="+pColor1+"></td>"+
         "   <td bgcolor="+pColor2+" width=100%></td>"+
		  "   <td bgcolor="+pColor1+"></td>"+
         "   <td rowspan=2></td>"+
        "  </tr>"+
        "  <tr height=1> "+
        "    <td></td>"+
        "    <td bgcolor="+pColor1+"></td>"+
        "    <td></td>"+
        "  </tr>"+
      "  </table>");
	}

function Circle_border2(pColor1,pColor2){
		document.write("<table cellpadding=0 align=\"center\" cellspacing=0 border=0 width=\"100%\">"+
   " <tr height=1> "+
    "  <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0><TR><TD width=1></td></tr></table></td>"+
    "  <td rowspan=3 width=1><table cellpadding=0 cellspacing=0 border=0><TR><TD width=1></td></tr></table></td>"+
    "  <td rowspan=2 width=1 ><table cellpadding=0 cellspacing=0 border=0><TR><TD width=1></td></tr></table></td>"+
    "  <td width=2><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
    "  <td bgcolor="+pColor1+" width=100%></td>"+
    "  <td width=2 ><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
    "  <td rowspan=2 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
   "   <td rowspan=3 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
   "   <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
   " </tr>"+
   " <tr height=1> "+
   "   <td bgcolor="+pColor1+"></td>"+
   "   <td bgcolor="+pColor2+"></td>"+
   "   <td bgcolor="+pColor1+"></td>"+
   " </tr>"+
   " <tr height=1> "+
   "   <td bgcolor="+pColor1+"></td>"+
   "   <td colspan=3 bgcolor="+pColor2+"></td>"+
   "   <td bgcolor="+pColor1+"></td>"+
   " </tr>"+
  "  <tr height=3> "+
   "   <td bgcolor="+pColor1+"></td>"+
   "   <td colspan=5 bgcolor="+pColor2+"></td>"+
   "   <td bgcolor="+pColor1+"></td>"+
  "  </tr>"+
 " </table>");
	}
	
	
	
function Circle_border1_pro(pColor1,pColor2,pWidth){
	document.write("<table cellpadding=0 cellspacing=0 border=0 width='"+pWidth+"'>"+
        "  <tr height=2> "+
         "   <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor1+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=2 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
         "   <td bgcolor="+pColor2+"  width=100%></td>"+
          "  <td width=2 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor2+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td width=1 bgcolor="+pColor1+"><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
         "   <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
       "   </tr>"+
         " <tr height=1> "+
         "   <td rowspan=3></td>"+
         "   <td bgcolor="+pColor1+"></td>"+
         "   <td colspan=3 bgcolor="+pColor2+" width=100%></td>"+
         "   <td bgcolor="+pColor1+"></td>"+
         "   <td rowspan=3></td>"+
         " </tr>"+
         " <tr height=1> "+
         "   <td rowspan=2></td>"+
         "   <td bgcolor="+pColor1+"></td>"+
         "   <td bgcolor="+pColor2+" width=100%></td>"+
		  "   <td bgcolor="+pColor1+"></td>"+
         "   <td rowspan=2></td>"+
        "  </tr>"+
        "  <tr height=1> "+
        "    <td></td>"+
        "    <td bgcolor="+pColor1+"></td>"+
        "    <td></td>"+
        "  </tr>"+
      "  </table>");
	}

function Circle_border2_pro(pColor1,pColor2,pWidth){
		document.write("<table cellpadding=0 align=\"center\" cellspacing=0 border=0 width=\""+pWidth+"\">"+
   " <tr height=1> "+
    "  <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0><TR><TD width=1></td></tr></table></td>"+
    "  <td rowspan=3 width=1><table cellpadding=0 cellspacing=0 border=0><TR><TD width=1></td></tr></table></td>"+
    "  <td rowspan=2 width=1 ><table cellpadding=0 cellspacing=0 border=0><TR><TD width=1></td></tr></table></td>"+
    "  <td width=2><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
    "  <td bgcolor="+pColor1+" width=100%></td>"+
    "  <td width=2 ><table cellpadding=0 cellspacing=0 border=0 width=2><TR><TD></td></tr></table></td>"+
    "  <td rowspan=2 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
   "   <td rowspan=3 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
   "   <td rowspan=4 width=1><table cellpadding=0 cellspacing=0 border=0 width=1><TR><TD></td></tr></table></td>"+
   " </tr>"+
   " <tr height=1> "+
   "   <td bgcolor="+pColor1+"></td>"+
   "   <td bgcolor="+pColor2+"></td>"+
   "   <td bgcolor="+pColor1+"></td>"+
   " </tr>"+
   " <tr height=1> "+
   "   <td bgcolor="+pColor1+"></td>"+
   "   <td colspan=3 bgcolor="+pColor2+"></td>"+
   "   <td bgcolor="+pColor1+"></td>"+
   " </tr>"+
  "  <tr height=3> "+
   "   <td bgcolor="+pColor1+"></td>"+
   "   <td colspan=5 bgcolor="+pColor2+"></td>"+
   "   <td bgcolor="+pColor1+"></td>"+
  "  </tr>"+
 " </table>");
}
	

function  getArgs()
{
	var args = new Object();
	var query = location.search.substring(1);
	var pairs = query.split("&");
	
	for(var i = 0; i < pairs.length; i++)
	{
		var pos = pairs[i].indexOf("=");
		//document.write (pairs[i]+"--"+pairs.length+"<br>");
		if (pos == -1) continue;
		var argname = pairs[i].substring(0,pos);
		var value   = pairs[i].substring(pos+1);
		args[argname] = unescape(value);
		
		// document.write (i+","+pairs.length+","+argname+"="+unescape(value)+"<br>");
	}
	return args;
}


function ShowSelect(pSpanWidth,pSelectWidth,pOptions,pSelectName,pEvent){
	document.write("<table cellpadding=\"0\" cellspacing=\"0\" width=\"10\" border=\"0\">\n"
+"	<TR>\n"
+"		<TD height=\"22\"><img src=\"http://img.joycity.cc/SelectImages/left.gif\" width=\"3\" height=\"22\" border=\"0\"></TD>\n"
+"		<TD width=\"100%\" background=\"http://img.joycity.cc/SelectImages/center.gif\"><span style=\"width:"+pSpanWidth+";height:16px;overflow:hidden\"> <select class=\"en9pt\" id=\""+pSelectName+"\" name=\""+pSelectName+"\" "+pEvent+" style=\"margin=-2; border-style:none;   width:"+pSelectWidth+"px;  \">");
	
	//for (var i=0; i<pOptions.length;i++){
		//document.write("<option value=\""+pValues[i]+"\">"+pOptions[i]+"</option>");
	//}
	
	document.write(pOptions);
document.write("</select></span></TD>\n"
+"		<TD><img src=\"http://img.joycity.cc/SelectImages/right.gif\" width=\"3\" height=\"22\"></TD>\n"
+"	</TR>\n"
+"</table>");
}

function ShowInput(pType,pName,pWidth,pContent){
	document.write("\n"
+"<span>\n"
+"<table cellpadding=\"0\" cellspacing=\"0\" width=\"10\" border=\"0\">\n"
+"	<TR>\n"
+"		<TD height=\"22\"><img src=\"http://img.joycity.cc/SelectImages/left.gif\" width=\"3\" height=\"22\" align='absmiddle' border=\"0\"></TD>\n"
+"		<TD width=\"100%\" background=\"http://img.joycity.cc/SelectImages/center.gif\"><input type=\""+pType+"\" name=\""+pName+"\" id=\""+pName+"\" class=\"en9pt\" style=\"border:0px; width:"+pWidth+"px;height:18\"  ></TD>\n"
+"		<TD><img src=\"http://img.joycity.cc/SelectImages/right.gif\" width=\"3\" height=\"22\"  align='absmiddle'></TD>\n"
+"	</TR>\n"
+"</table></span>");
	//alert(pContent);
	//eval("document.all."+pName+".value=\""+pContent+"\";");
	try{
		document.getElementById(pName).value=pContent;
	}catch(e){
		document.getElementByName(pName).value=pContent;
	}
}

function ShowTextarea(pName,pWidth,pHeight,pContent){
		document.write("<table cellpadding=\"0\" cellspacing=\"0\" width=\""+pWidth+"\" border=\"0\">\n"+"	<TR>\n"+"		<TD><img src=\"http://img.joycity.cc/SelectImages/lt.gif\" width=\"3\" height=\"4\"></TD>\n"+"		<TD background=\"http://img.joycity.cc/SelectImages/t.gif\"></TD>\n"+"		<TD><img src=\"http://img.joycity.cc/SelectImages/rt.gif\" width=\"3\" height=\"4\"></TD>\n"+"	</TR>\n"+"	<Tr>\n"+"		<TD  background=\"http://img.joycity.cc/SelectImages/l.gif\"></TD>\n"+"		<TD><textarea name=\""+pName+"\" id='"+pName+"' class=\"myInput\" style=\"height:"+pHeight+" ;width:"+pWidth+"\"   style=\"margin-top=-2; margin-bottom:-2; border-style:none; \">"+pContent+"</textarea></TD>\n"+"		<TD background=\"http://img.joycity.cc/SelectImages/r.gif\"></TD>\n"+"	</Tr>\n"+"	<TR>\n"+"		<TD><img src=\"http://img.joycity.cc/SelectImages/lb.gif\" width=\"3\" height=\"4\"></TD>\n"+"		<TD background=\"http://img.joycity.cc/SelectImages/b.gif\"></TD>\n"+"		<TD><img src=\"http://img.joycity.cc/SelectImages/rb.gif\" width=\"3\" height=\"4\"></TD>\n"+"	</TR>\n"+"</table>");
}


//编码程序： 
function CodeCookie(str) 
{ 
　var strRtn=""; 

　for (var i=str.length-1;i>=0;i--) 
　{ 
　　strRtn+=str.charCodeAt(i); 
　　if (i) strRtn+="anbcied"; //用a作分隔符 
　} 
　return strRtn; 
} 

//解码程序： 
function DecodeCookie(str) 
{ 
　var strArr; 
　var strRtn=""; 

　strArr=str.split("anbcied"); 

　for (var i=strArr.length-1;i>=0;i--) 
　strRtn+=String.fromCharCode(eval(strArr[i])); 

　return strRtn; 
} 


function getCookie1( name ){
		
		
        var nameOfCookie = name + "=";
        var x = 0;
        while ( x <= document.cookie.length )
        {
                var y = (x+nameOfCookie.length);
                if ( document.cookie.substring( x, y ) == nameOfCookie ) {
                        if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
                                endOfCookie = document.cookie.length;
                        return unescape( document.cookie.substring( y, endOfCookie ) );
                }
                x = document.cookie.indexOf( " ", x ) + 1;
                if ( x == 0 )
                        break;
        }
        return "";
}










