function fixedPositionForIE6(type,length){ //type:fixedSide or fixedBottom,  length:fixedSide=topCss or  fixedBottom:objHeight 
	var viewportScroll = (document.documentElement) ? document.documentElement.scrollTop : document.body.scrollTop;	
	var viewportHeight = (document.documentElement) ? document.documentElement.clientHeight : document.body.clientHeight;

	if(type == "fixedSide"){		
		var objTop = length;
		return objTop + viewportScroll + "px";
	} else if( type == "fixedBottom"){				
		var objHeight = length;
		var objTop = viewportHeight - objHeight;		
		return objTop + viewportScroll + "px"
	}
}
function goTop(){	
	window.scrollTo(0,0);	
}

function Topbtn(id){
	var target = document.getElementById(id);
	var tars = target.style;
	var ch = document.documentElement.clientHeight;
	var sh = document.documentElement.scrollHeight;
	if(sh <= ch){
		tars.display="none";
	}
}

function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabList = tabContainer.getElementsByTagName("li");
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabList.length; i++) {
		if (tabList.item(i).className == "")
			thismenu = tabList.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace("on", "");
				}
			}

			this.targetEl.style.display = "block";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += "on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î[, º¯¼ö][,¹è°æ»ö][,À©µµ¿ì¸ðµå])
function flashWrite(url,w,h,vars,bg,win){
	
	var id=url.split("/")[url.split("/").length-1].split(".")[0]; //id´Â ÆÄÀÏ¸íÀ¸·Î ¼³Á¤
	if(vars==null) vars='';
	if(bg==null) bg='#FFFFFF';
	if(win==null) win='transparent';


	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr= "	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'";
		flashStr+="			codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
		flashStr+="			width='"+w+"'";
		flashStr+="			height='"+h+"'";
		flashStr+="			id='"+id+"'";
		flashStr+="			align='middle'>";

		flashStr+="		<param name='allowScriptAccess' value='always' />";
		flashStr+="		<param name='movie' value='"+url+"' />";
		flashStr+="		<param name='FlashVars' value='"+vars+"' />";
		flashStr+="		<param name='wmode' value='"+win+"' />";
		flashStr+="		<param name='menu' value='false' />";
		flashStr+="		<param name='quality' value='high' />";
		flashStr+="		<param name='bgcolor' value='"+bg+"' />";
	
	
		flashStr+="		<embed src='"+url+"'";
		flashStr+="		       flashVars='"+vars+"'";
		flashStr+="		       wmode='"+win+"'";
		flashStr+="		       menu='false'";
		flashStr+="		       quality='high'";
		flashStr+="		       bgcolor='"+bg+"'";
		flashStr+="		       width='"+w+"'";
		flashStr+="		       height='"+h+"'";
		flashStr+="		       name='"+id+"'";
		flashStr+="		       align='middle'";
		flashStr+="		       allowScriptAccess='always'";
		flashStr+="		       type='application/x-shockwave-flash'";
		flashStr+="		       pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		flashStr+=" </object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}

function openPopup(url,wd,he) { 
	window.open(url,'','width='+wd+',height='+he+',top=100,left=100,status=yes'); 
} 
function fullscreen(url){
	window.open(url,'','toolbar=no,location=no,channelmode=1,fullscreen=1,screenY=1,alwaysRaised=1')
} 
function openPopup1(url){
	wd = screen.width;
	wd = wd-8;
	he = screen.height;
	he = he-60;
	window.open(url,'','width='+wd+',height='+he+',top=0,left=0,status=no'); 
}
function closepop(url)
{
   opener.location.href = url;
 
   window.close();
}
function eventover(url){
	url.src = url.src.replace(".gif", "_on.gif");
}
function eventout(url){
	url.src = url.src.replace("_on.gif", ".gif");
}
function eventChange(num){
	box1 = document.getElementById('change1');
	box2 = document.getElementById('change2');
	for(i=1;i<=2;i++){
		if(num==1){
			box1.style.display = "block";
			box2.style.display = "none";
		}
		else{
			box1.style.display = "none";
			box2.style.display = "block";	
		}
	}
}

