//ÇÃ·¡½ÃÁ¦³×·¹ÀÌÅÍ...id,³ÐÀÌ,³ôÀÌ,Åõ¸í¿©ºÎ,Å©·Î½ºµµ¸ÞÀÎÇã¿ë
function FlashGen(id,w,h,url,transPparent,arrowDomain){
//alert(url)
//var _globlURL="./Flash/";
//var _globlURL="./Flash/";
var url=url;
if(arrowDomain){
var arrowDomainT="always";
}else{
var arrowDomainT="always";
}
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width="+w+" height="+h+" id='"+id+"'>")
document.write("<param name='movie' value='"+url+"'/>");
document.write("<param name='quality' value='high' />");
if(!transPparent){
document.write("<param name='wmode' value='transparent' />");
}
document.write("<param name='allowScriptAccess' value='"+arrowDomainT+"' />");
document.write("<embed src='"+url+"' quality='high' wmode='transparent' width="+w+" height="+h+" name='"+id+"' align='middle' allowScriptAccess='"+arrowDomainT+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.write("</object>");

}
function popup(url,cw,ch,scroll,resize) {
    //»õÃ¢ÀÇ Å©±â
   
    //½ºÅ©¸°ÀÇ Å©±â
    var sw=screen.availWidth;
    var sh=screen.availHeight;
    //¿­ Ã¢ÀÇ Æ÷Áö¼Ç
    var px=(sw-cw)/2;
   var py=(sh-ch)/2;
    //Ã¢À» ¿©´ÂºÎºÐ
    window.open(''+url+'','½Å±âÇÑÁý','left='+px+',top='+py+',width='+cw+',height='+ch+',toolbar=no,menubar=no,status=no,scrollbars='+scroll+',resizable='+resize);
}
function pop_sn(url,w,h,n) {
	l = (screen.width) ?	(screen.width-w) / 2	: 0;
	t = (screen.height) ?	(screen.height-h) / 2 : 0;	
	var opt='top='+t+',left='+l+',width='+w+',height='+h;
	opt=opt+',toolbar=no,status=no,directories=no,scrollbars='+n+',location=no,resizable=no,menubar=no';
	aa=window.open(url,'',opt);
	aa.document.write("<html><head></head><body topmargin='0' leftmargin='0'><img src='"+url+"' border='0' onClick='window.close();' style='cursor:hand' alt='¸¶¿ì½º¸¦ Å¬¸¯ÇÏ¸é Ã¢ÀÌ ´ÝÄ¨´Ï´Ù'></body></html>")
//alert()
}
function cleanup() {
 __flash_unloadHandler = function(){
  externalProbSet = true;
  obj = document.getElementsByTagName('OBJECT');
  for (i=0;i<obj.length;i++){
   var theObj = eval(obj[i]);
   theObj.style.display = "none";
   for (var prop in theObj){
    if (typeof(theObj[prop]) == "function"){
     theObj[prop]=null
    }
   }
  }
 }
 if (window.onunload != __flash_unloadHandler){
  __flash_savedUnloadHandler = window.onunload;
  window.onunload = __flash_unloadHandler;
 }
}
window.onbeforeunload=cleanup;

function cpOpen(){
	window.open('/site/kolon_motors/financial/','BMW','width=830,height=650');
}
function OnScrollGen() {
	var y;
	document.getElementById("divMenu").top = top.pageYOffset+135;
	document.getElementById("divMenu").visibility = "visible";
	CheckUIElements();
	return true;
}

function CheckUIElements() {
	
	var hhh = 180
	//ÀÌ ¼ýÀÚ¸¦ ¼öÁ¤ÇÏ¸é À§ÂÊ¿©¹éÀ» Á¶Àý ÇÒ ¼ö ÀÖ½À´Ï´Ù
	var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
	yMenuFrom = parseInt(document.getElementById("divMenu").style.top, 10);
	yMenuTo = document.body.scrollTop+hhh;
	timeoutNextCheck = 300;
	if (Math.abs(yButtonFrom-(yMenuTo+152))<6 && yButtonTo<yButtonFrom) {
		setTimeout("CheckUIElements()", timeoutNextCheck);
		return;
	}
	if (yMenuFrom != yMenuTo) {
		var yOffset = Math.ceil(Math.abs(yMenuTo-yMenuFrom)/20);
		if (yMenuTo<yMenuFrom) {
			yOffset = -yOffset;
		}
		//divMenu.style.top = parseInt(document.getElementById("divMenu").style.top, 10)+yOffset;
		document.getElementById("divMenu").style.top = parseInt(document.getElementById("divMenu").style.top, 10)+yOffset;
		timeoutNextCheck = 10;
	}
	setTimeout("CheckUIElements()", timeoutNextCheck);
}
//// ÇÏ´ÜÄÝ¼¾ÅÍ
/*
function OnScrollGenB() {
	var y;
	document.getElementById("divMenuB").top = top.pageYOffset+135;
	document.getElementById("divMenuB").visibility = "visible";
	CheckUIElementsB();
	return true;
}

function CheckUIElementsB() {
	
	var hhh =document.body.clientHeight-220
	//ÀÌ ¼ýÀÚ¸¦ ¼öÁ¤ÇÏ¸é À§ÂÊ¿©¹éÀ» Á¶Àý ÇÒ ¼ö ÀÖ½À´Ï´Ù
	var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
	yMenuFrom = parseInt(document.getElementById("divMenuB").style.top, 10);
	//
	yMenuTo = document.body.scrollTop+hhh;
	timeoutNextCheckB = 300;
	if (Math.abs(yButtonFrom-(yMenuTo+152))<6 && yButtonTo<yButtonFrom) {
		setTimeout("CheckUIElementsB()", timeoutNextCheckB);
		return;
	}
	if (yMenuFrom != yMenuTo) {
		var yOffset = Math.ceil(Math.abs(yMenuTo-yMenuFrom)/20);
		if (yMenuTo<yMenuFrom) {
			yOffset = -yOffset;
		}
		divMenuB.style.top = parseInt(document.getElementById("divMenuB").style.top, 10)+yOffset;
			timeoutNextCheckB = 15
	}
	setTimeout("CheckUIElementsB()", timeoutNextCheckB);
}
*/
function showX6(){
popup("http://www.bmwtrack1.com/bmw.asp",1005,600,"no","no")
}

function showX1(){
window.open("http://www.bmwtrack1.com")
}