function trim(src) { 
    var search = 0; 
    while (src.charAt(search) == " ")     {  
        search = search + 1; 
    } 
    src = src.substring(search, (src.length)); 
    search = src.length - 1; 
    while (src.charAt(search) == " ")     { 
        search = search - 1; 
    } 
    return src.substring(0, search + 1);         
}

/*    *    *    *    *    *    *    *    *    *    *    *    **/
/*    *    scrolling S    *    *    *    *    *    *    *    */
function scrolling(objId,sec1,sec2,speed,height){ 
    this.objId=objId; 
    this.sec1=sec1; 
    this.sec2=sec2; 
    this.speed=speed; 
    this.height=height; 
    this.h=0; 
    this.div=document.getElementById(this.objId); 
    this.htmltxt=this.div.innerHTML; 
    this.div.innerHTML=this.htmltxt+this.htmltxt; 
    this.div.isover=false; 
    this.div.onmouseover=function(){this.isover=true;} 
    this.div.onmouseout=function(){this.isover=false;} 
    var self=this; 
    this.div.scrollTop=0; 
    window.setTimeout(function(){self.play()},this.sec1); 
} 
scrolling.prototype={ 
    play:function(){ 
        var self=this; 
        if(!this.div.isover){ 
            this.div.scrollTop+=this.speed; 
            if(this.div.scrollTop>this.div.scrollHeight/2){ 
                this.div.scrollTop=0; 
            }else{ 
                this.h+=this.speed; 
                if(this.h>=this.height){ 
                    if(this.h>this.height|| this.div.scrollTop%this.height !=0){ 
                        this.div.scrollTop-=this.h%this.height; 
                    } 
                    this.h=0; 
                    window.setTimeout(function(){self.play()},this.sec1); 
                    return; 
                } 
            } 
        } 
        window.setTimeout(function(){self.play()},this.sec2); 
    }, 
    prev:function(){ 
        if(this.div.scrollTop == 0) 
        this.div.scrollTop = this.div.scrollHeight/2; 
        this.div.scrollTop -= this.height; 
    }, 
    next:function(){ 
        if(this.div.scrollTop == this.div.scrollHeight/2) 
        this.div.scrollTop =0; 
        this.div.scrollTop += this.height; 
    } 
}; 
/*    *    scrolling E    *    *    *    *    *    *    *    */
/*    *    *    *    *    *    *    *    *    *    *    *    **/


/*    *    *    *    *    *    *    *    *    *    *    *    **/
/*   boardTop ElectricBoard S   *    *    *    *    *    *    */
var boardTop_electric_height = new Array(0, 49, 52, 52, 51);
function write_boardTop_electric() {
	 var count = boardTop_electric_content.length;
	 var info, info_sp;
	 var view = "<div id=\"boardTop_electric\" style=\"width:590px; height:"+electric_height+"px; background:url('http://image.playforum.net:8080/wow/info/common/boardTop/boardTop_electric_back_0"+boardTop_electric+".gif');\">"
	                + "<div id=\"view_electric\" style=\"height:"+electric_height2+"px;\">"
					+ "<table cellpadding=\"0\" cellspacing=\"0\">";

	 for(var i = 0 ; i < count ; i++) {
		 info = boardTop_electric_content[i];
		 info_sp = info.split("||");
		 view += "<tr height=\""+electric_height2+"\">"
		            + "<th>"+info_sp[0]+"</th>";
		if(info_sp[2] && "" != info_sp[2]) { 
			view += "<td><a href=\""+info_sp[2]+"\" target=\"_blank\">"+info_sp[1]+"</a></td>";	
		} else { 
			view +=  "<td>"+info_sp[1]+"</td>"; 
		}
		view += "</tr>";
	 }
	 view += "</table></div></div>";
	 return view;
}
/*    boardTop ElectricBoard E   *    *    *    *    *    *    */
/*    *    *    *    *    *    *    *    *    *    *    *    **/



/*    *    *    *    *    *    *    *    *    *    *    *    **/
/*   main ElectricBoard S   *    *    *    *    *    *    */
function write_main_electric() {
	 var count = boardTop_electric_content.length;
	 var info, info_sp;
	 var view = "<div id=\"boardTop_electric\" style=\"width:599px; height:52px; background:url('http://image.playforum.net:8080/metalrage/common/main_electric_back.gif');\">"
	                + "<div id=\"view_electric\" style=\"height:"+electric_height2+"px;\">"
					+ "<table cellpadding=\"0\" cellspacing=\"0\">";

	 for(var i = 0 ; i < count ; i++) {
		 info = boardTop_electric_content[i];
		 info_sp = info.split("||");
		 view += "<tr height=\""+electric_height2+"\">"
		            + "<th>"+info_sp[0]+"</th><td>&nbsp;</td>";
		if(info_sp[2] && "" != info_sp[2]) { 
			view += "<td><a href=\""+info_sp[2]+"\" target=\"_blank\">"+info_sp[1]+"</a></td>";	
		} else { 
			view +=  "<td>"+info_sp[1]+"</td>"; 
		}
		view += "</tr>";
	 }
	 view += "</table></div></div>";
	 return view;
}
/*    main ElectricBoard E   *    *    *    *    *    *    */
/*    *    *    *    *    *    *    *    *    *    *    *    **/