function MakeFlash(Url,Name,Width,Height,Wmode)
{
    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\" id=\"" + Name + "\" width=\"" + Width + "\" height=\"" + Height + "\" onError=\"this.style.display='none'\" />"); 
    document.writeln("<param name=\"allowScriptAccess\" value=\"sameDomain\" />"); 
    document.writeln("<param name=\"movie\" value=\"" + Url + "\" />"); 
    document.writeln("<param name=\"quality\" value=\"high\" />");     
    document.writeln("<param name=\"wmode\" value=\"" + Wmode + "\" />"); 
    document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" name=\"" + Name + "\" width=\"" + Width + "\"  height=\"" + Height + "\" />"); 
    document.writeln("</object>");     
}
function vod_patch(file, id, width, height,display){

var str='<OBJECT width="'+width+'" height="'+height+'" id="'+id+'" type="application/x-oleobject" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" style="display:'+display+'">';
str+='<PARAM NAME="Filename" VALUE="'+file+'">';
str+='<param name="autostart" value="0">'
str+='<PARAM NAME="AllowChangeDisplaySize" VALUE="0">'
str+='<PARAM NAME="CurrentPosition" VALUE="1">'
str+='<PARAM NAME="ShowControls" VALUE="0">'
str+='<PARAM NAME="Volume" VALUE="-530">'
str+='<PARAM NAME="WindowlessVideo" VALUE="-1">'
str+='</OBJECT>'
document.write(str);
}


String.prototype.toInteger = function() {
 return this.replace(/[^0-9]/g, '') * 1;
}
/////////follow_banner("¹è³Ê¾ÆÀÌµð", ¿ø·¡ÀÇ À§Ä¡, µû¶ó´Ù´Ï±â ½ÃÀÛÇÏ´Â ³ôÀÌ, È­¸é À§ÂÊ¸¶Áø,ÆäÀÌÁö ³ôÀÌ, º£³Ê ¸ØÃß´Â À§Ä¡(¾Æ·¡ÂÊ) );//////
function follow_banner(div_id, origin_top, limit_top, margin_top,body_height, max)
{
 var d, t, s, g, target_height;
 origin_top *= 1;
 limit_top *= 1;
 margin_top *= 1;
 
 d = document.getElementById(div_id);
 s = document.body.scrollTop + "";

 target_height = s.toInteger() + margin_top;
 if(target_height < limit_top) {
  target_height = origin_top;
 }
body_height=document.body.scrollHeight;
 t = d.style.top.toInteger();
 var t_bottom = (body_height-(t+260));

if(t_bottom>max||target_height<t){ 
 if(t != target_height) {
  g = Math.ceil(((t - target_height) / 5));
  //alert(t+" "+target_height+" "+(t - target_height)+" "+g);
  if(g > 50) {
   g = 50;
  } else if (g < -50) {
   g = -50;
  }
  if(g == 0 && (t - target_height) < 0){
	d.style.top = (t + 1) + "px";
  }else{
    d.style.top = (t - g) + "px";
  }
 }
}
 setTimeout("follow_banner('" + div_id + "', " + origin_top + ", " + limit_top + ", " + margin_top + ","+body_height+","+max+");", 1);
}

open_imgpop = function(table, filename, width, height)
{
	window.open("/lib/module/popup/img_popup.html?table="+table+"&filename="+filename, table, "width="+width+",height="+height);
}

var content = new Object();
content.con = "";
content.img = "";

content.clear_content = function(img_id,con_id){

	content.con = document.getElementsByName(con_id);
	content.img = document.getElementsByName(img_id);
	for(var i =0; i<this.con.length; i++){		
		this.con[i].style.display="none";
	}
	for(var i=0; i<this.img.length; i++){
		if(this.img[i].src.indexOf("_1") != -1){
			this.img[i].src = this.img[i].src.replace(/_1/ig, "_2");
		}
	}
}

content.change_content = function(n,img_id,con_id, table){
	this.clear_content(img_id, con_id);	
	this.con[n].style.display="block";
	switch(table){

		case "eye01":
		exception = 4;
		break;

		default:
			exception = n+1;
		break;
	}

	if(n < exception){
	this.img[n].src = this.img[n].src.replace(/_2/gi, "_1");
	}
}

reset_table = function(t,i){
	for(var j =0; j < t.length; j++){
		t[j].style.display = "none";
		if(i[j].src.indexOf != "_1"){
			i[j].src=i[j].src.replace(/_1/gi,"_2");
		}
	}
}
chnage = function(t,i,n){
	var tb = document.getElementsByName(t);
	var ig = document.getElementsByName(i);
	reset_table(tb, ig);
	tb[n].style.display="block";
	ig[n].src = ig[n].src.replace(/_2/gi, "_1");	
}
