function MakeFlash(Url,Width,Height){                 
  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\" width=\"" + Width + "\" height=\"" + Height + "\">"); 
  document.writeln("<param name=\"movie\" value=\"" + Url + "\">"); 
  document.writeln("<param name=\"quality\" value=\"high\" />");     
  document.writeln("<param name=\"wmode\" value=\"transparent\">"); 
  document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">"); 
  document.writeln("</object>");     
} 
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_swapImgRestore() { //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];}
}

/* open WIN*/	
	function openWin(theURL,winName,features) { //v2.0
 	 window.open(theURL,winName,features);
	}

/* ALL BLUR */
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}

var main_url=document.URL;
 
if(main_url.indexOf("/index.asp") < 0){
	document.onfocusin=bluring
}

/* quick menu script */

	var stmnLEFT = 930; 
	var stmnGAP1 = 448; 
	var stmnGAP2 = 448; 
	var stmnBASE = 448; 
	var stmnActivateSpeed = 200;
	var stmnScrollSpeed = 10;
	 
	var stmnTimer;
	 

	function ReadCookie(name)
	{
	var label = name + "=";
	var labelLen = label.length;
	var cLen = document.cookie.length;
	var i = 0;
	 
	while (i < cLen) {
					var j = i + labelLen;
	 
					if (document.cookie.substring(i, j) == label) {
									var cEnd = document.cookie.indexOf(";", j);
									if (cEnd == -1) cEnd = document.cookie.length;
	 
									return unescape(document.cookie.substring(j, cEnd));
					}
	 
					i++;
	}
	 
	return "";
	}
	 
	function SaveCookie(name, value, expire)
	{
	var eDate = new Date();
	eDate.setDate(eDate.getDate() + expire);
	document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/";
	}
	 
	function RefreshStaticMenu()
	{
	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
	 
	stmnStartPoint = parseInt(STATICMENU.style.top, 10);
	stmnEndPoint = document.body.scrollTop + stmnGAP2;
	if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
	 
	stmnRefreshTimer = stmnActivateSpeed;
	 
	if ( stmnStartPoint != stmnEndPoint ) {
					stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
					STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
					stmnRefreshTimer = stmnScrollSpeed;
	}
	 
	stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
	}
	 
	function ToggleAnimate()
	{
	if (ANIMATE.checked) {
					RefreshStaticMenu();
					SaveCookie("ANIMATE", "true", 300);
	}
	else {
					clearTimeout(stmnTimer);
					STATICMENU.style.top = stmnGAP1;
					SaveCookie("ANIMATE", "false", 300);
	}
	}
	 
	function InitializeStaticMenu()
	{
	STATICMENU.style.left = stmnLEFT;
	 
			 if (ReadCookie("ANIMATE") == "false") {
					ANIMATE.checked = false;
					STATICMENU.style.top = document.body.scrollTop + stmnGAP1;
	}
	else {
					ANIMATE.checked = true;
					STATICMENU.style.top = document.body.scrollTop + stmnBASE;
					RefreshStaticMenu();
	}
	}
	
function EmbedObject() {
// Object
	var objectTAG		= new String;
	//SWF
	var classIDSWF		= 'CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000';
	var codeBaseSWF		= 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab';

	//WMP
	var classIDWMP		= 'CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95';
	var codeBaseWMP		= 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab';

// Param
	var parameterTAG	= new String;

// Embed
	var embedTAG		= new String;

	// SWF
	var typeSWF			= 'application/x-shockwave-flash';
	var pluginsPageSWF	= 'http://www.macromedia.com/go/getflashplayer';

	// WMP
	var typeWMP			= 'application/x-mplayer2';
	var pluginsPageWMP	= 'http://www.microsoft.com/Windows/MediaPlayer/';	

    this.embedSWF		= embedSWF;
    this.embedWMP		= embedWMP;
	this.editObject		= editObject;
    this.editParam		= editParam;
    this.editEmbed		= editEmbed;
    this.displayHTML	= displayHTML;
	this.showembedTAG	= showembedTAG;

	// Flash ³Ö´Â ÇÔ¼ö
	function embedSWF(srcSWF, widthSWF, heightSWF, objectID, alignSWF, verSWF) {

		//Script init
		objectTAG += "<OBJECT ";
		embedTAG += "<EMBED ";

		//Class ID
		objectTAG += "classid='"+ classIDSWF +"' ";
	
		//CodeBase, Version
		(verSWF) ? codeBaseSWF += "#version="+ verSWF : codeBaseSWF += "#version=8,0,0,0"
		this.editObject('codebase',codeBaseSWF);


		// Align
		if (alignSWF)	{
			this.editObject('align',alignSWF);
		}

		// ID
		if (objectID)	{
			this.editObject('id',ObjectID);
			this.editEmbed('name',objectID);
		}
		
		//Parameter
		this.editParam('quality','high');
		this.editParam('movie',srcSWF,'Param');

		//Embed tag
		this.editEmbed('src',srcSWF);
		this.editEmbed('pluginspage',pluginsPageSWF);
		this.editEmbed('type',typeSWF);


		if (widthSWF)	{
			this.editObject('width',widthSWF);
			this.editEmbed('width',widthSWF);
		}

		if (heightSWF)	{
			this.editObject('height',heightSWF);
			this.editEmbed('height',heightSWF);
		}
	}

	// Media Player ³Ö´Â ÇÔ¼ö
	function embedWMP(srcWMP, widthWMP, heightWMP, objectID, alignWMP, verWMP) {

		//Script init
		objectTAG += "<OBJECT ";
		embedTAG += "<EMBED ";

		//Class ID
		objectTAG += "classid='"+ classIDWMP +"' ";
	
		//CodeBase, Version
		(verWMP) ? codeBaseWMP += "#version="+ verWMP : codeBaseWMP += "#version=5,1,52,701"
		this.editObject('codebase',codeBaseWMP);

		//Type
		this.editObject('type','application/x-oleobject');

		// ID
		if (objectID)	{
			this.editObject('id',ObjectID);
			this.editEmbed('name',objectID);
		}

		// Align
		if (alignWMP)	{
			this.editObject('align',alignWMP);
		}
		
		//Parameter
		this.editParam('FileName',srcWMP,'Param');

		//Embed tag
		this.editEmbed('src',srcWMP);
		this.editEmbed('pluginspage',pluginsPageWMP);
		this.editEmbed('type',typeWMP);


		if (widthWMP)	{
			this.editObject('width',widthWMP);
			this.editEmbed('width',widthWMP);
		}

		if (heightWMP)	{
			this.editObject('height',heightWMP);
			this.editEmbed('height',heightWMP);
		}
	}
	
	//Object Tag
	function editObject(name, value) {
		objectTAG += " " + name + "='" + value + "' ";
	}

	//Parameter Tag
	function editParam(name, value, target) {

		parameterTAG += "<PARAM NAME='"+name+"' VALUE='"+value+"'>\n";
		
		// editParamÇÔ¼ö¿¡¼­ Object ¹× Embed¿¡ ÇÑ²¨¹ø¿¡ Áý¾î³ÖÀ½. 
		if (!target) {
			editEmbed(name, value);
		}
	}
	//Embed Tag
	function editEmbed(name, value) {
		embedTAG += " " + name + "='" + value + "' ";
	}

	//HTML¿¡ »Ñ·ÁÁÖ´Â ÇÔ¼ö
	function displayHTML() {
		objectTAG	+= ">\n";
		embedTAG	+= "></EMBED>\n";
		document.write(objectTAG);
		document.write(parameterTAG);
		document.write(embedTAG);
		document.write("</OBJECT>");
//		alert(objectTAG + parameterTAG + embedTAG);
	}

	function showembedTAG() {
		alert(objectTAG + parameterTAG + embedTAG);
	}
}

/*FAQ script*/
function tLayer(id, total){
	for(i=1;i<=total;i++){
		if(i!=id){
			obj1 = eval("ztab" + i);
			obj1.style.display = "none";
			obj2 = eval("THimg" + i);
			obj2.style.display = "none";
			style1 = eval("q"+i);
			style1.style.color = "#87795c";
		}
	}
	
	
	obj1 = eval("ztab" + id);
	style1 = eval("q"+id);
	obj2 = eval("THimg" + id);
	
	if(obj1.style.display == "none"){
		obj1.style.display = "";
		style1.style.color = "#000000";
		obj2.style.display = "inline";
	}
	else{
		obj1.style.display = "none";
		style1.style.color = "#7e7e7e";
		obj2.style.display = "none";
	}
		
}
/*
IE Flash ActiveContent Activation Script
Author: Faisal Iqbal (chall3ng3r)
Blog: http://www.orison.biz/blog/chall3ng3r/

Feel free to modify or distribute.
*/
 
/*
Method: FlashObject
 Param1: SWF path
 Param2: Movie width
 Param3: Movie height
 Param4: BGColor
 Param5: Flashvars (Optional)
*/
function FlashObject(swf, width, height, bgcolor,wmode, flashvars)
{
    var strFlashTag = new String();
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
        strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        strFlashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=8,0,0,0" ';
 				strFlashTag += 'width="' + width + '" height="' + height + '">';
        strFlashTag += '<param name="movie" value="' + swf + '"/>';
  			if(flashvars != null) {strFlashTag += '<param name="flashvars" value="' + flashvars + '"/>'};
        strFlashTag += '<param name="quality" value="HIGH"/>';
        strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
  			strFlashTag += '<param name="menu" value="false"/>';
  			strFlashTag += '<param name="salign" value="LT"/>';
  			strFlashTag += '<param name="scale" value="noscale"/>';
  			strFlashTag += '<param name="wmode" value="'+wmode+'"/>';
				strFlashTag += '<param name="allowScriptAccess" value="always"/>';
        strFlashTag += '</object>';
    }
    else
    {
        strFlashTag += '<embed src="' + swf + '" ';
        strFlashTag += 'quality="HIGH" ';
        strFlashTag += 'bgcolor="' + bgcolor + '" ';
        strFlashTag += 'width="' + width + '" ';
        strFlashTag += 'height="' + height + '" ';
  			strFlashTag += 'menu="false" ';
  			strFlashTag += 'scale="noscale" ';
  			strFlashTag += 'salign="LT" ';
  			strFlashTag += 'wmode="'+wmode+'" ';
  			strFlashTag += 'allowScriptAccess="always" ';
  			if(flashvars != null) {strFlashTag += 'flashvars="' + flashvars + '" '};
        strFlashTag += 'type="application/x-shockwave-flash" ';
        strFlashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        strFlashTag += '</embed>';
    }
 document.write(strFlashTag);
}







var bV = parseInt(navigator.appVersion);
// print
function printWin() 
{
 if (bV >= 4) {
    	pop_ifm.focus();
  		parent.frames.pop_ifm.window.print();
	}
} 

function printWindow() 
{
 
 if (bV >= 4) {
 //var contents = frames[frmName].document.getElementById("contents").innerHTML;
    if(Zpop.style.display=="block")
    {
    	pop_ifm.focus();
    	pop_ifm.focus();
  		parent.frames.pop_ifm.window.print();
  	}
  	else
  	{
  		printWindow_guide();
  	}
  }
} 

function printWindow_loan() 
{
// bV = parseInt(navigator.appVersion);
 if (bV >= 4) 
 {
	 if(Zpop.style.display=="block")
    {
    	pop_ifm.focus();
    	pop_ifm.focus();
  		parent.frames.pop_ifm.window.print();
  	}
  	else
  	{
  		window.onbeforeprint = beforeDivs; 
   		window.onafterprint = afterDivs; 
	 		window.print();
  	}
  }
}

function printWindow_guide() 
{
// bV = parseInt(navigator.appVersion);
 if (bV >= 4) 
 {
	 window.onbeforeprint = beforeDivs; 
   window.onafterprint = afterDivs; 
	 window.print();
 }
} 
var tempBody;
function beforeDivs () { 
  tempBody = document.body.innerHTML;
	document.body.innerHTML = Gcontents.innerHTML;
} 
function afterDivs () {   
  document.body.innerHTML = tempBody;
} 

/*
var tempBody;



window.onbeforeprint = function() {


  tempBody = document.body.innerHTML;

	

  document.body.innerHTML = Gcontents.innerHTML;

}

window.onafterprint = function() {

  document.body.innerHTML = tempBody;

}

*/


//function printWindow2() 
//{
// bV = parseInt(navigator.appVersion);
// 	if (bV >= 4)
// 	{ 
// 		top.pop_ifm.focus();
//		pop_ifm.print();
//	}
//}
//function printWindow3() 
//{
// bV = parseInt(navigator.appVersion);
// 	if (bV >= 4)
// 	{ 
// 		//alert(document.getElementById("pprint"));
//		document.getElementById("pprint").focus();
//		window.print();
//	}
//}

function pop_cf(Zadd){
	window.open('/pop_cf.asp','pop','width=320, height=240');
	//Zmovie('/upload_data/advertisement/Lets_Love_40s.mpeg')
}



// tab ½ºÅ©¸³Æ® 2008.12.08 Ãß°¡-¼±³à
function tabSwap(sw) {
	for (i = 1; i < 3; i++) {
		if (sw == i) {		
			document.getElementById('tab01_0'+i+'contents').style.display='block';
		} else {
			document.getElementById('tab01_0'+i+'contents').style.display='none';
		}
	}
}
