function a(element){ 
 if(arguments.length>1){ 
  for(var i=0,length=arguments.length,elements=[];i<length;i++){ 
   elements.push($(arguments[i])); 
  } 
  return elements; 
 } 
 if(typeof element=="string"){ 
  return document.getElementById(element); 
 }else{ 
  return element; 
 } 
} 
var Class={ 
 create:function(){ 
  return function(){ 
   this.initialize.apply(this,arguments); 
  } 
 } 
} 
Function.prototype.bind=function(object){ 
 var method=this; 
 return function(){ 
  method.apply(object,arguments); 
 } 
} 
var Scroll=Class.create(); 
Scroll.prototype={ 
 initialize:function(element,height){ 
  this.element=a(element); 
  this.element.innerHTML+=this.element.innerHTML; 
  this.height=height; 
  this.maxHeight=this.element.scrollHeight/2; 
  this.counter=0; 
  this.scroll(); 
  this.timer=""; 
  this.element.onmouseover=this.stop.bind(this); 
  this.element.onmouseout=function(){this.timer=setTimeout(this.scroll.bind(this),1000);}.bind(this); 
 }, 
 scroll:function(){ 
  if(this.element.scrollTop<this.maxHeight){ 
   this.element.scrollTop++; 
   this.counter++; 
  }else{ 
   this.element.scrollTop=0; 
   this.counter=0; 
  } 
   
  if(this.counter<this.height){ 
   this.timer=setTimeout(this.scroll.bind(this),22); 
  }else{ 
   this.counter=0; 
   this.timer=setTimeout(this.scroll.bind(this),3126); 
  } 
 }, 
 stop:function(){ 
  clearTimeout(this.timer); 
 } 
}  
function borderit(which,color){
if (document.all||document.getElementById){
which.style.borderColor=color;
}
}

function secBoard(elementID,listName,n) { 

var elem = document.getElementById(elementID); 

var elemlist = elem.getElementsByTagName("h3"); 

for (var i=0; i<elemlist.length; i++) { 

elemlist[i].className = "normal"; 

var m = i+1; 

document.getElementById(listName+"_"+m).className = "normal"; 

} 

elemlist[n-1].className = "current"; 

document.getElementById(listName+"_"+n).className = "current"; 

} 

function chdiv(a){
	if(document.getElementById("yd" + a).style.display=='block') return;
	for(i=0;i<4;i++){
			document.getElementById("mp" + i).style.backgroundColor='#dcdcdc';
			document.getElementById("mp" + i).style.color='#000';
			document.getElementById("yd" + i).style.display='none';
		}
		document.getElementById("mp" + a).style.backgroundColor='#c2130e';
		document.getElementById("mp" + a).style.color='#fff';
		document.getElementById("yd" + a).style.display='block';
	}
	function setborder(ts,ys){
		ts.style.borderColor=ys;
		}

function MakeFlash(Url,Width,Height){                   
document.writeln("<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=\"" + Width + "\" height=\"" + Height + "\">");   
document.writeln("<param name=\"movie\" value=\"" + Url + "\">");   
document.writeln("<param name=\"quality\" value=\"high\" />");       
document.writeln("<param name=\"wmode\" value=\"transparent\">");
document.writeln("<param name=\"menu\" value=\"false\">");
document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">");   
document.writeln("</object>");     
} 
