function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="images") document.body.focus();
}
document.onfocusin=bluring; 

function MM_swapimagesRestore() { //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_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_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_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 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 IEObjConvert(str)
{
	document.write(str);
}

function goPage(url,num){
	document.frmList.pageno.value = num;
	document.frmList.action = url;
	document.frmList.target = "_self";
	document.frmList.submit() ;
}


function getFlashObject(flashSrc, objWidth, objHeight, etcParam) {
	var tag = "";
	var baseFlashDir="";
	flashSrc = baseFlashDir + flashSrc;

	if ( etcParam != "" || etcParam != null ) {
		if ( etcParam.substr(0, 1) == "?" )
			flashSrc += etcParam;
		else
			flashSrc += "?" + etcParam;
	}

	tag += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
	tag += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" ";
	tag += "width=\"" + objWidth + "\" height=\"" + objHeight + "\">";
	tag += "<param name=\"movie\" value=\"" + flashSrc + "\">";
	tag += "<param name=\"menu\" value=\"false\">";
	tag += "<param name=\"quality\" value=\"high\">";
	tag += "<param name=\"wmode\" value=\"transparent\">";
	tag += "<embed src=\"" + flashSrc + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
	tag += "type=\"application/x-shockwave-flash\" width=\"" + objWidth + "\" height=\"" + objHeight + "\" ";
	tag += "wmode=\"transparent\"></embed>";
	tag += "</object>";

	document.write(tag);
}

function getMovieObject(movieSrc, objWidth, objHeight, etcParam) {
	var tag = "";
	var baseFlashDir="";
	movieSrc = baseFlashDir + movieSrc;

	if ( etcParam != "" || etcParam != null ) {
		if ( etcParam.substr(0, 1) == "?" )
			movieSrc += etcParam;
		else
			movieSrc += "?" + etcParam;
	}

	tag = "<embed src=\"" + movieSrc + "\" width=\"" + objWidth + "\" height=\"" + objHeight + "\"></embed>";

	document.write(tag);
}

// top_menu new 
// NvScroll() ½ÃÀÛ : 

function NvScroll() {
	this.version = "0.2";
	this.name = "NvScroll";
	this.item = new Array();
	this.itemcount = 0;
	this.currentspeed = 0;
	this.scrollspeed = 50;
	this.pausedelay = 1000;
	this.pausemouseover = false;
	this.stop = false;
	this.type = 1;
	this.height = 100;
	this.width = 100;
	this.stopHeight=0;
	this.i=0;
	this.add = function () {
	 var text = arguments[0];
	 this.item[this.itemcount] = text;
	 this.itemcount = this.itemcount + 1;
	};
	this.add2 = function () {
	 var url = arguments[0];
	 var title = arguments[1];
	 this.item[this.itemcount] = "<a href=" + url + ">" + title + "</a>";
	 this.itemcount = this.itemcount + 1;
	};
	this.start = function () {
	 if ( this.itemcount == 1 ) {
	  this.add(this.item[0]);
	 }
	 this.display();
	 this.currentspeed = this.scrollspeed;
	 if ( this.type == 1 || this.type == 2 ) {
	  this.stop = true;
	  setTimeout(this.name+'.scroll()',this.currentspeed);
	  window.setTimeout(this.name+".stop = false", this.pausedelay);
	 } else if ( this.type == 3 ) {
	  this.stop = true;
	  setTimeout(this.name+'.rolling()',this.currentspeed);
	  window.setTimeout(this.name+".stop = false", this.pausedelay);
	 }
	};
	this.display = function () {
	 document.write('<div id="'+this.name+'" style="height:'+this.height+'; width:'+this.width+'; position:relative; overflow:hidden; " OnMouseOver="'+this.name+'.onmouseover(); " OnMouseOut="'+this.name+'.onmouseout(); ">');
	 for(var i = 0; i < this.itemcount; i++) {
	  if ( this.type == 1 ) {
	   document.write('<div id="'+this.name+'item'+i+'"style="left:0px; width:'+this.width+'; position:absolute; top:'+(this.height*i)+'px; ">');
	   document.write(this.item[i]);
	   document.write('</div>');
	  } else if ( this.type == 2 || this.type == 3 ) {
	   document.write('<div id="'+this.name+'item'+i+'"style="left:'+(this.width*i)+'px; width:'+this.width+'; position:absolute; top:0px; ">');
	   document.write(this.item[i]);
	   document.write('</div>');
	  }
	 }
	 document.write('</div>');
	};
	this.scroll = function () {
	 if ( this.pause == true ) {
	  window.setTimeout(this.name+".scroll()",this.pausedelay);
	  this.pause = false;
	 } else {
	  this.currentspeed = this.scrollspeed;
	  if ( !this.stop ) {
	   for (i = 0; i < this.itemcount; i++) {
		obj = document.getElementById(this.name+'item'+i).style;
		if ( this.type == 1 ) {
		 obj.top = parseInt(obj.top) - 1;
		 if ( parseInt(obj.top) <= this.height * (-1) ) obj.top = this.height * (this.itemcount-1);
		 if ( parseInt(obj.top) == 0 ) this.currentspeed = this.pausedelay;
		} else if ( this.type == 2 ) {
		 obj.left = parseInt(obj.left) - 1;
		 if ( parseInt(obj.left) <= this.width * (-1) ) obj.left = this.width * (this.itemcount-1);
		 if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay;
		}
	   }
	  }
	  window.setTimeout(this.name+".scroll()",this.currentspeed);
	 }
	};
	this.rolling = function () {
	 if ( this.stop == false  ) {
	  this.next();
	 }
	 window.setTimeout(this.name+".rolling()",this.scrollspeed);
	}
	this.onmouseover = function () {
	 if ( this.pausemouseover ) {
	  this.stop = true;
	 }
	};
	this.onmouseout = function () {
	 if ( this.pausemouseover ) {
	  this.stop = false;
	 }
	};
	this.next = function() {
	 for (i = 0; i < this.itemcount; i++) {
	  obj = document.getElementById(this.name+'item'+i).style;
	  if ( parseInt(obj.left) < 1 ) { 
	   width = this.width + parseInt(obj.left);
	   break;
	  }
	 }
	 for (i = 0; i < this.itemcount; i++) {
	  obj = document.getElementById(this.name+'item'+i).style;
	  if ( parseInt(obj.left) < 1 ) { 
	   obj.left = this.width * (this.itemcount-1);
	  } else {
	   obj.left = parseInt(obj.left) - width;
	  }
	 }
	}
	this.prev = function() {
	 for (i = 0; i < this.itemcount; i++) {
	  obj = document.getElementById(this.name+'item'+i).style;
	  if ( parseInt(obj.left) < 1 ) { 
	   width = parseInt(obj.left) * (-1);
	   break;
	  }
	 }
	 if ( width == 0 ) {
	  total_width = this.width * (this.itemcount-1);
	  for (i = 0; i < this.itemcount; i++) {
	   obj = document.getElementById(this.name+'item'+i).style;
	   if ( parseInt(obj.left) + 1 > total_width ) { 
		obj.left = 0;
	   } else {
		obj.left = parseInt(obj.left) + this.width;
	   }
	  }
	 } else {
	  for (i = 0; i < this.itemcount; i++) {
	   obj = document.getElementById(this.name+'item'+i).style;
	   if ( parseInt(obj.left) < 1 ) { 
		obj.left = 0;
	   } else {
		obj.left = parseInt(obj.left) + width;
	   }
	  }
	 }
	}
	this.unext = function () {
	 this.onmouseover();
	 this.next();
	 window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}
	this.uprev = function () {
	 this.onmouseover();
	 this.prev();
	 window.setTimeout(this.name+".onmouseout()",this.pausedelay);
	}
}
// NvScroll() ³¡


//ÇÃ·¡½Ã
function obj_swf(src,w,h) {
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="bgcolor" value="#ffffff">';
	html += '<param name="menu" value="false">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="swliveconnect" value="true">';
	html += '<embed src="'+src+'" quality=high bgcolor="#ffffff" menu="false" width="'+w+'" height="'+h+'" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	document.write(html);
}


//½ºÆ®¸®¹Ö
function obj_wmp(src,w,h) {
	html = '';
	html += '<object id="player" name="player" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"';
	html += 'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" style="position:absolute;  width:' + w + 'px; height:' + h + 'px;">';	// ++ 100%
//	html += 'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" style="position:absolute; left:'+l+'px; top:'+t+'px; width:640px; height:480px;">';	// ++ 200%
	html += '<param name="Filename" value="'+src+'">';
	html += '<param name="autoStart" value="true">';
	html += '<param name="balance" value="0">';
	html += '<param name="defaultFrame" value="false">';
	html += '<param name="enableContextMenu" value="false">';
	html += '<param name="enabled" value="true">';
	html += '<param name="fullScreen" value="true">';
	html += '<param name="invokeURLs" value="true">';
	html += '<param name="mute" value="false">';
	html += '<param name="playCount" value="false">';
	html += '<param name="rate" value="false">';
	html += '<param name="SAMIFileName" value="false">';
	html += '<param name="SAMILang" value="false">';
	html += '<param name="SAMIStyle" value="false">';
	html += '<param name="stretchToFit" value="false">';
	html += '<param name="uiMode" value="true">';
	html += '<param name="volume" value="-300">';
	html += '<param name="windowlessVideo" value="false">';
	html += '<param name="ShowControls" value="true">';
	html += '<param name="ShowPositionControls" value="false">';
	html += '<param name="ShowStatusBar" value="false">';
	html += '<param name="CurrentPosition" value="false">';
	html += '<param name="DisplayBackColor" value="false">';
	html += '<param name="DisplayForeColor" value="false">';
	html += '<\/object>';
	document.write(html);
}

function MM_openWin(url, win, stat) {
	window.open(url, win, stat);
	return;
}
