function topbanner_num(m1,m2){

function mt_cnt(m1,m2){
      return m1+parseInt(Math.random()*(m2+1-m1));
      
 }

var mt = mt_cnt(m1,m2);

for(i=1;i<3; i++){
  if(i == mt){
   document.getElementById("tb"+i).style.display="block";
   }
   else
  {
  document.getElementById("tb"+i).style.display="none";
  }
  }
}


function cf(flashsrc,flashwidth,flashheight,flashlink,br,linkname,linktarget){ 
document.write("<table width="+flashwidth+" height="+flashheight+" border=0 cellpadding=0 cellspacing=0><tr><td>"); 
document.write("<div style=\"position:relative\">"); 
document.write("<embed style=\"position:absolute;z-index:0\" src="+flashsrc+" quality=\"high\" width="+flashwidth+" height="+flashheight+" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" wmode=\"transparent\"></embed>"); 
document.write("<div style=\"position:relative;z-index:10;left:0;top:0;background-color:#ffffff;filter:alpha(opacity=0);-moz-opacity:0; Opacity:0;width:"+flashwidth+";height:"+flashheight+"px;\">"); 
document.write("<a href="+flashlink+" target=\"_blank\" style=\"cursor:pointer;display:block;width:"+flashwidth+";height:"+flashheight+"px;\" onClick=\"recordOutboundLink(this, 'linkname', 'linktarget');return false;\"></a>"); 
document.write("</div>"); 
document.write("</div>"); 
document.write("</td></tr></table>"); 
if (br=="1") { 
document.write("<br>"); 
} 
} 

function cf1(flashsrc,flashwidth,flashheight,br){ 
document.write("<embed src=\""+flashsrc+"\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width="+flashwidth+" height="+flashheight+" align=center></embed>"); 
if (br=="1") { 
document.write("<br><br>"); 
} 
} 






/*
Author: mg12
Update: 2008/11/21
Author URI: http://www.neoease.com/
*/
(function() {

function $(id) {
	return document.getElementById(id);
}

function setStyleDisplay(id, status) {
	$(id).style.display = status;
}

function goTop(acceleration, time) {
	acceleration = acceleration || 0.1;
	time = time || 16;

	var dx = 0;
	var dy = 0;
	var bx = 0;
	var by = 0;
	var wx = 0;
	var wy = 0;

	if (document.documentElement) {
		dx = document.documentElement.scrollLeft || 0;
		dy = document.documentElement.scrollTop || 0;
	}
	if (document.body) {
		bx = document.body.scrollLeft || 0;
		by = document.body.scrollTop || 0;
	}
	var wx = window.scrollX || 0;
	var wy = window.scrollY || 0;

	var x = Math.max(wx, Math.max(bx, dx));
	var y = Math.max(wy, Math.max(by, dy));

	var speed = 1 + acceleration;
	window.scrollTo(Math.floor(x / speed), Math.floor(y / speed));
	if(x > 0 || y > 0) {
		var invokeFunction = "MGJS.goTop(" + acceleration + ", " + time + ")"
		window.setTimeout(invokeFunction, time);
	}
}
})




