function flashCM(id, url, width, height, vars, bgColor, winmode) {
  //winmode - opaque, transparent
	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' "); 
	document.write("		width='"+width+"' height='"+height+"' id='"+id+"' align='middle'> ");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie' 						value='"+url+"' /> ");
	document.write("	<param name='FlashVars' 				value='"+vars+"' /> ");
	document.write("	<param name='wmode' 						value='"+winmode+"' /> ");
	document.write("	<param name='menu' 							value='false' /> ");
	document.write("	<param name='quality'						value='high' /> ");
	document.write("	<param name='bgcolor'						value='"+bgColor+"' /> ");
	document.write("	<embed src='"+url+"' flashVars='"+vars+"' wmode='"+winmode+"' menu='false' quality='high' ");
	document.write("		bgcolor='"+bgColor+"' width='"+width+"' height='"+height+"' name='"+id+"' align='middle' ");
	document.write("		allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> ");
	document.write("	</object> ");
}

// ÇØ»óµµ¿¡ µû¶ó ½ºÅ©·Ñ »ý¼º
function sizeCM(flashURL, vars) {
	flashCM("mainVisual", flashURL + ".swf", '100%', '100%', vars, '#000000', 'opaque');
	setInterval("flashSize()",1);
}

// ÇØ»óµµ¿¡ µû¶ó ½ºÅ©·Ñ »ý¼º
function flashSize() {
	
	var maxW = 995;
	var maxH = 830;
	
	el = document.getElementById("mainVisual");

	if(document.body.clientHeight <= maxH && document.body.clientWidth <= maxW){
		el.setAttribute("height",maxH);
		el.style.height = el.getAttribute("height");
		el.setAttribute("width",maxW);
		el.style.width = el.getAttribute("width");
	}else if(document.body.clientHeight <= maxH && document.body.clientWidth >= maxW){
		el.setAttribute("height",maxH);
		el.style.height = el.getAttribute("height");
		el.style.width = 100+"%";
	}else if(document.body.clientHeight >= maxH && document.body.clientWidth <= maxW){
		el.style.height = 100+"%";
		el.setAttribute("width",maxW);
		el.style.width = el.getAttribute("width");
	} else {
		el.style.width = 100+"%";
		el.style.height = 100+"%";
	}
}


// ÇØ»óµµ¿¡ µû¶ó ½ºÅ©·Ñ »ý¼º
function sizeCM_main(flashURL, vars) {
	flashCM("mainVisual", flashURL + ".swf", '100%', '100%', vars, '#000000', 'opaque');
	setInterval("flashSize_main()",1);
}

// ÇØ»óµµ¿¡ µû¶ó ½ºÅ©·Ñ »ý¼º__(¸ÞÀÎ ÆäÀÌÁö¿ë)
function flashSize_main() {
	
	var maxW = 995;
	var maxH = 550;
	
	el = document.getElementById("mainVisual");

	if(document.body.clientHeight <= maxH && document.body.clientWidth <= maxW){
		el.setAttribute("height",maxH);
		el.style.height = el.getAttribute("height");
		el.setAttribute("width",maxW);
		el.style.width = el.getAttribute("width");
	}else if(document.body.clientHeight <= maxH && document.body.clientWidth >= maxW){
		el.setAttribute("height",maxH);
		el.style.height = el.getAttribute("height");
		el.style.width = 100+"%";
	}else if(document.body.clientHeight >= maxH && document.body.clientWidth <= maxW){
		el.style.height = 100+"%";
		el.setAttribute("width",maxW);
		el.style.width = el.getAttribute("width");
	} else {
		el.style.width = 100+"%";
		el.style.height = 100+"%";
	}
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




//ÆäÀÌÁö ¸µÅ©(±âº»)
function subPageOpen(url) {
  self.location.href=url;
}


//Å¾ ¸Þ´º ¸µÅ©  //
function subMainPageOpen(num) {

  if (num == 1) {
     self.location.href="subMain.html?ID=HK"
  }
  if (num == 2) {
     self.location.href="subMain.html?ID=EU"
  }
  if (num == 3) {
     self.location.href="subMain.html?ID=AME"
  }
  if (num == 4) {
     self.location.href="subMain.html?ID=J_C"
  }
  if (num == 5) {
     self.location.href="subMain.html?ID=SP"
  }
  if (num == 6) {
     self.location.href="subMain.html?ID=SC"
  }
  if (num == 7) {
     self.location.href="subMain.html?ID=CR"
  }
  if (num == 8) {
     self.location.href="subMain.html?ID=GO"
  }
}




 //·Î±×ÀÎ
function popUpLogin(url) {
  window.open(url,"popup1","scrollbars=0, status=1, width=676, height=559")
 }
 

//¿¹¾àÈ®ÀÎÇÏ±â ÆË¾÷
function popUpSearch(url) {
  window.open(url,"popup2","scrollbars=0, status=1, width=595, height=448")
 }

//¸¶ÀÌÆäÀÌÁö ÆË¾÷
function popUpMypage(url) {
  window.open(url,"popup3","scrollbars=1, status=1, width=695, height=650")
}



//¿¹¾àÇÏ±â ÆË¾÷
function popUpReservation(url) {
  window.open(url,"popup4","scrollbars=1, status=1, width=710, height=612")
 }
 
 

//ÀüÃ¼°¡°Ýº¸±â ÆË¾÷
function popUpTotalPrice(url) {
  window.open(url,"popup5","scrollbars=1, status=1, width=865, height=612")
}

//ÀüÃ¼ÀÏÁ¤º¸±â ÆË¾÷
function popUpTotalTable(url) {
  window.open(url,"popup6","scrollbars=1, status=1, width=865, height=612")
}

//ÇÃ·¡³Ê¿¡°Ô ¸ÞÀÏ º¸³»±â
function mailTo(url, mail){
	// mail º¯¼ö°ªÀº ÇØ´ç ÇÃ·¡³Ê ÀÌ¸ÞÀÏ ÁÖ¼Ò ÀÔ´Ï´Ù. ÆË¾÷ ÆäÀÌÁö¿¡ ÇÊ¿äÇÒ °Í °°¾Æ ÀÏ´Ü ÇÃ·¡½Ã¿¡¼­ º¯¼ö°ª ³»º¸³»µµ·Ï Ã³¸®ÇØ ³õ¾Ò½À´Ï´Ù.
	window.open("login/popup/post_number/pop_sub_emailform.html?JMMail=" + mail,"popup7","scrollbars=0, status=1, width=580, height=611")
}

//°ü·ÃÄÁÅÙÃ÷ ÆË¾÷
function popUpRelation(url) {
  window.open(url,"popup8","scrollbars=1, status=1, width=702, height=612")
}


//ÀÌº¥Æ® »õÃ¢ ¿­±â
function popUpWindow(url) {
  window.open(url,"event")
}
