 /**********************************************************************************
	Flash Script
***********************************************************************************/
function flashMenu(url,width,height, wmode) { 
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" />');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name=movie value="'+url+'" />');
//document.write('<param name=wmode value=opaque>');
document.write('<param name=quality value=high />');
document.write( "<param name=wmode value=" + wmode+ ">");
document.write('<embed src="'+url+'" quality=high allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">');
document.write('</embed> ');
document.write('</object>');
}
//-->

/**********************************************************************************
	Image Roll Over
***********************************************************************************/
	
	function preload(imgObj,imgSrc) {
		if (document.images) {
			eval(imgObj+' = new Image()')
			eval(imgObj+'.src = "'+imgSrc+'"')
		}
	}
	function imgChg(imgName,imgObj) {
		if (document.images) {
			document.images[imgName].src = eval(imgObj+".src")
		}
	}

	function imgChg2(imgName,imgSrc) {
		var objImg = document.getElementById(imgName);
		objImg.src = imgSrc;
	}
	
	
	ns4 = (document.layers)?true:false
	ie4 = (document.all)?true:false	
//-->

/**********************************************************************************
	Image Roll Over
***********************************************************************************/
	function menuOver() {
	 this.src = this.src.replace(".gif", "_on.gif");
	}
	function menuOut() {
	 this.src = this.src.replace("_on.gif", ".gif");
	}
	function imageOver(imgEl) {
	 imgEl.src = imgEl.src.replace(".gif", "_on.gif");
	}
	function imageOut(imgEl) {
	 imgEl.src = imgEl.src.replace("_on.gif", ".gif");
	}
	function trOver(trAct) {
	 trAct.className = "on";
	}
	function trOut(trAct) {
	 trAct.className = "";
	}
//-->
	
 /**********************************************************************************
	Layer Show/Hidden - with Event onMouseover onMouseOut 
***********************************************************************************/

	function viewOnline(cID) {
		var cObj = document.getElementById(cID);
		if (cObj == null) return;
		cObj.style.display = (cObj.style.display=="none")?"":"";
	}

	function closeOnline(cID) {
		var cObj = document.getElementById(cID);
		cObj.style.display = "none";
	}
	
	function TogleMenu(layerId) {
		objid = layerId;
		objectlayer = document.getElementById(objid);

		if (objectlayer != '' && objectlayer != undefined) {
			if (objectlayer.style.display == 'none') {
				viewOnline(objid);
			}else{
				closeOnline(objid);
			}
		}else{
			return;
		}
	}
//-->

/**********************************************************************************
	News Upper Scroller 
***********************************************************************************/
//´º½º ½ºÅ©·Ñ·¯
function drScroll() {

	this.version = "0.1";
	this.name = "drScroll";
	this.item = new Array();
	this.itemcount = 0;
	this.itemoffset = 0;
	this.item_i = new Array();
	this.item_icount = 0;
	this.item_ioffset = 0;
	this.currentspeed = 0;
	this.scrollspeed = 50;
	this.pausedelay = 1000;
	this.pausemouseover = false;
	this.stop = 0;
	this.height = 100;
	this.heightGap = 0;
	this.width = 100;
	this.height_i = 0;
	this.width_i = 0;
	this.stopHeight=0;
	this.count=0;
	this.flag=true;
	this.position="absolute";
	this.item_position="absolute";

	this.add = function () {
		var text = arguments[0];
		this.item[this.itemcount] = text;
		this.itemcount = this.itemcount + 1;
	};

	this.addImage = function () {
		var text = arguments[0];
		this.item_i[this.item_icount] = text;
		this.item_icount = this.item_icount + 1;
	};

	this.start = function () {
		this.display();
		this.currentspeed = this.scrollspeed;
		obj = document.getElementById(this.name+'item0').style;
		obj.display='block';
		this.count++;
		setTimeout(this.name+'.scroll()',this.currentspeed);
	};

	this.ready = function () {
		now = new Date(); ran = now % this.item_icount;
		temp = this.item_i[ran]; this.item_i[ran] = this.item_i[0]; this.item_i[0] = temp;
		this.displayImage();
		obj_i = document.getElementById(this.name+'item_i0').style;
		obj_i.display='block';
	};

	this.display = function () {
		document.write('<div id="'+this.name+'" style="height:'+this.height+';width:'+this.width+';position:'+this.position+';overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
		for(var i = 0; i < this.itemcount; i++) {
				document.write('<div id="'+this.name+'item'+i+'"style="left:0px; width:'+this.width+';position:'+this.item_position+'; display:none; ">');
				document.write(this.item[i]);
				document.write('</div>');
		}
		document.write('</div>');
	};

	this.displayImage = function () {
		/*document.write('<div id="'+this.name+'_i" style="left:0; height:'+this.height_i+';width:'+this.width_i+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
		for(var i = 0; i < this.item_icount; i++) {
			document.write('<div id="'+this.name+'item_i'+i+'"style="left:0px; width:'+this.width_i+'; display:none; ">');
			document.write(this.item_i[i]);
			document.write('</div>');
		}
		document.write('</div>');
		*/
	};

	this.scroll = function () {
		this.currentspeed = this.scrollspeed;
		if ( !this.stop ) {
			this.imageChange();
		}
		window.setTimeout(this.name+".scroll()",this.currentspeed);
	};


	this.imageChange = function ()
	{
		for (k = 0; k < this.item_icount; k++) {
			obj_i = document.getElementById(this.name+'item_i'+k).style;
			if (this.count % this.item_icount == k) {
				obj_i.display = 'block';
			} else {
				obj_i.display = 'none';
			}
		}
		for (k = 0; k < this.itemcount; k++) {
			obj = document.getElementById(this.name+'item'+k).style;
			if (this.count % this.itemcount == k) {
				obj.display = 'block';
			} else {
				obj.display = 'none';
			}
		}
		this.count++;
	}

	this.onmouseover = function ()
	{
		if ( this.pausemouseover ) {
			this.stop = 1;
		}
	};
  for (k = 0; k < this.item_icount; k++) {
    obj_i = document.getElementById(this.name+'item_i'+k).style;
    if (this.count % this.item_icount == k) {
      obj_i.display = 'block';
    } else {
      obj_i.display = 'none';
    }
  }

	this.onmouseout = function ()
	{
		if ( this.pausemouseover ) {
			this.stop = 0;
		}
	};

	this.up = function ()
	{

		var i;
		this.stop++;

		if ( this.itemcount <= this.itemoffset )
			this.itemoffset = this.itemoffset % this.itemcount;

		for (i = 0; i < this.item_icount; i++) {
			obj_i = document.getElementById(this.name+'item_i'+i).style;
			if ( obj_i.display == "block" ) {this.item_ioffset = i+1;obj_i.display="none";}
		}

		if (this.item_icount > 0) {
			if (this.item_ioffset < this.item_icount) {
				obj_i = document.getElementById(this.name+'item_i'+this.item_ioffset).style;
				obj_i.display = "block";
			} else {
				obj_i = document.getElementById(this.name+'item_i0').style;
				obj_i.display = "block";
			}
		}
		for (i = 0; i < this.itemcount; i++) {
			obj = document.getElementById(this.name+'item'+i).style;
			if ( obj.display == "block" ) {this.itemoffset = (i+this.itemcount-1)%this.itemcount;obj.display="none";}
		}

		if (this.itemoffset < this.itemcount) {
			obj = document.getElementById(this.name+'item'+this.itemoffset).style;
			obj.display = "block";
		} else {
			obj = document.getElementById(this.name+'item0').style;
			obj.display = "block";
		}
		window.setTimeout(this.name + ".stop--;",this.pausedelay);
		//this.stop--;
	}

	this.down = function ()
	{
		var i;
		this.stop++;

		if ( this.itemcount <= this.itemoffset )
			this.itemoffset = this.itemoffset % this.itemcount;

		for (i = 0; i < this.item_icount; i++) {
			obj_i = document.getElementById(this.name+'item_i'+i).style;
			if ( obj_i.display == "block" ) {this.item_ioffset = i+1;obj_i.display="none";}
		}

		if (this.item_icount > 0) {
			if (this.item_ioffset < this.item_icount) {
				obj_i = document.getElementById(this.name+'item_i'+this.item_ioffset).style;
				obj_i.display = "block";
			} else {
				obj_i = document.getElementById(this.name+'item_i0').style;
				obj_i.display = "block";
			}
		}
		for (i = 0; i < this.itemcount; i++) {
			obj = document.getElementById(this.name+'item'+i).style;
			if ( obj.display == "block" ) {this.itemoffset = i+1;obj.display="none";}
		}
		if (this.itemoffset < this.itemcount) {
			obj = document.getElementById(this.name+'item'+this.itemoffset).style;
			obj.display = "block";
		} else {
			obj = document.getElementById(this.name+'item0').style;
			obj.display = "block";
		}
		window.setTimeout(this.name + ".stop--;",this.pausedelay);
		//this.stop--;
	}
}
//-->