﻿
//기본 + 파라미터
function FlashIncParam(f_name,f_value,f_width,f_height,f_align,f_param){
	document.write('<object id="'+f_name+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+f_width+'" height="'+f_height+'">') ;
	document.write('<param name="movie" value="'+f_value+'.swf?'+f_param+'" />') ;
	document.write('<param name="quality" value="high" />') ;
	document.write('<param name="menu" value="false" />') ;
	document.write('<param name="wmode" value="transparent" />') ;
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="showLiveConnect" value="true" />' );
	document.write('<param name="allowFullScreen" value="true" />') ;
	document.write('<param name="scale" value="noscale"> ');
	document.write('<param name="salign" value="'+f_align+'">') ;
	document.write('<param name="FlashVars" value="'+f_param+'">');
	document.write('<embed src="'+f_value+'.swf?'+f_param+'" quality="high" name="'+f_name+'" SAlign="'+f_align+'" scale=noscale width="'+f_width+'" height="'+f_height+'" allowScriptAccess="always"  allowFullScreen="true" showLiveConnect="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />') ;
	document.write('</object>') ;	
}

//브랜드 페이지 제어 스크립트
function getVar(name){
	//alert(String(document.location));
	//alert(String(document.location).split('?')[1]);
	if(String(document.location).indexOf("?") != -1){
		cut=String(document.location).split('?')[1].split('&');
		//alert(String(document.location).split('?')[1].split('&')[0]);
		for(k in cut) {
			if(cut[k].split('=')[0] == name){
				//alert(cut[k].split('=')[1]);
				return cut[k].split('=')[1]
			}
		}
	}
} 


// 브랜드페이지에서 네비게이션이 쓰는 스크립트
function changeBrand(value1){
    //alert("["+document.getElementById("brand_f")+"]["+document.getElementById("logo_f")+"]에["+value1+"]보냄");
    document.getElementById("logo_f").sendToFlash(value1);
    document.getElementById("brand_f").sendToFlash2(value1);
}


// 네비게이션 on/off 제어 스크립트
function naviShow(onOff){
	//alert("네비게이션 on/off 호출:"+onOff)
	//alert(naviCon+":"+naviCon.style.display);
	if(onOff){
		document.getElementById("naviCon").style.display = "block";
		document.getElementById("footer").style.display = "block";
		document.getElementById("header").style.display ="block";

	}else{
		document.getElementById("naviCon").style.display = "none";
		document.getElementById("footer").style.display = "none";
		document.getElementById("header").style.display ="none";
	}
}
function defaultUnvisible(){
		document.getElementById("naviCon").style.display = "block";
		document.getElementById("footer").style.display = "block";
		document.getElementById("header").style.display ="block";
}

// 클립보드 붙여넣기 플래시
function setClip(string){
      document.getElementById("ClipFlash").sendToClip(string)
}

function resizeMain(){
		//alert(document.documentElement.clientWidth);
		if(document.documentElement.clientWidth >= 1024){
			document.getElementById("mainflash").style.width = document.documentElement.clientWidth;
			document.getElementById("wrap").style.width = document.documentElement.clientWidth;
		}
		if(document.documentElement.clientHeight >= 768){
			document.getElementById("mainflash").style.height = document.documentElement.clientHeight;
			document.getElementById("wrap").style.height = document.documentElement.clientHeight;
		}
}

function resizeBrand(){
		//alert(document.documentElement.clientWidth);
		if(document.documentElement.clientWidth >= 1024){
			document.getElementById("brand_f").style.width = document.documentElement.clientWidth;
		}		
}