//function MM_findObj(n, d) { //v4.0
//         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 && document.getElementById) x=document.getElementById(n); return x;
//}   



function writeObject(obj_file,width,height,wmode)
{
    var obj_src = "";
    obj_src += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\""+width+"\" height=\""+height+"\">\n";
    obj_src += "  <param name=\"movie\" value=\""+obj_file+"\">\n";
    obj_src += "  <param name=\"wmode\" value=\""+wmode+"\">\n";
    obj_src += "  <param name=\"menu\" value=\"false\">\n";
    obj_src += "  <param name=\"quality\" value=\"high\">\n";
    obj_src += "  <embed src=\""+obj_file+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\"></embed>\n";
    obj_src += "</object>\n";
    
    document.write(obj_src);
}
  
  
function changeimg(target, imgURL){
	document.all(target).src = imgURL
}

function showpic(strpic){	
	window.open ("/recipe/viewpic.asp?src=" + strpic, "viewPic", "width=100, height=100, scrollbars=yes, status=no, resizable=no, toolbar=no, top=100, left=100");
	return;
}

function changeImg(target, imgURL){
	document.all(target).src = imgURL
}

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) { //v3.0
  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); 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];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

  if (restore) selObj.selectedIndex=0;

}

function allblur() {
   for (i = 0; i < document.links.length; i++)
   document.links[i].onfocus = document.links[i].blur;
}


//community_faq
function toggleMenu(currMenu){
		if (document.all){
		thisMenu = eval('document.all.' + currMenu + '.style')
		if (thisMenu.display == 'block') {
		document.all.menu1.style.display = 'none'
		document.all.menu2.style.display = 'none'
		document.all.menu3.style.display = 'none'
		document.all.menu4.style.display = 'none'
		document.all.menu5.style.display = 'none'
		document.all.menu6.style.display = 'none'
		document.all.menu7.style.display = 'none'
		document.all.menu8.style.display = 'none'
		document.all.menu9.style.display = 'none'
		document.all.menu10.style.display = 'none'
		thisMenu.display = 'block'
		}
		else {
		document.all.menu1.style.display = 'none'
		document.all.menu2.style.display = 'none'
		document.all.menu3.style.display = 'none'
		document.all.menu4.style.display = 'none'
		document.all.menu5.style.display = 'none'
		document.all.menu6.style.display = 'none'
		document.all.menu7.style.display = 'none'
		document.all.menu8.style.display = 'none'
		document.all.menu9.style.display = 'none'
		document.all.menu10.style.display = 'none'
		thisMenu.display = 'block'
		}
		return false
		}else{
		return true
		}
	}



function MM_nbGroup(event, grpName) { //v3.0
  var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) {
      img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    if ((nbArr = document[grpName]) != null)
      for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = args[i+1];
      nbArr[nbArr.length] = img;
  } }
}



//***** ¿ÞÂÊ¸Þ´º ·Ñ¿À¹ö*****
var MENU;
var OVER;
function Over(n)
{
	if(n != -1)
	{
		obj = eval("document.all.leftmenu_"+n);
		obj.src = "/images/"+MENU+"/leftmenu_"+n+"_on.gif";
	}
}
function Out(n)
{
	if(n != -1)
	{
		if(OVER!=n)
		{
		obj = eval("document.all.leftmenu_"+n);
		obj.src = "/images/"+MENU+"/leftmenu_"+n+".gif";
		}
	}
}

//***** °øÅë ·Ñ¿À¹ö*****
function commOver(dir,n)
{
	obj = eval("document.all."+n);
	obj.src = "/image/"+dir+"/"+n+"_on.gif";
}
function commOut(dir,n)
{
	obj = eval("document.all."+n);
	obj.src = "/image/"+dir+"/"+n+"_off.gif";
}

//-->

/********************************
*			 IE ActiveX Patch
********************************/

//°øÅëÇÃ·¯½¬
function EmbededFlash(sourceUrl,objWidth,objHeight){
	document.write("<OBJECT codeBase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'");
	document.write("height='"+objHeight+"' width='"+objWidth+"' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'>");
	document.write("<PARAM NAME='FlashVars' VALUE=''>");
	document.write("<PARAM NAME='Movie' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='Src' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='WMode' VALUE='Transparent'>");
	document.write("<PARAM NAME='Play' VALUE='-1'>");
	document.write("<PARAM NAME='Loop' VALUE='-1'>");
	document.write("<PARAM NAME='Quality' VALUE='High'>");
	document.write("<PARAM NAME='SAlign' VALUE=''>");
	document.write("<PARAM NAME='Menu' VALUE='-1'>");
	document.write("<PARAM NAME='Base' VALUE=''>");
	document.write("<PARAM NAME='AllowScriptAccess' VALUE='sameDomain'>");
	document.write("<PARAM NAME='Scale' VALUE='ShowAll'>");
	document.write("<PARAM NAME='DeviceFont' VALUE='0'>");
	document.write("<PARAM NAME='EmbedMovie' VALUE='0'>");
	document.write("<PARAM NAME='BGColor' VALUE=''>");
	document.write("<PARAM NAME='SWRemote' VALUE=''>");
	document.write("<PARAM NAME='MovieData' VALUE=''>");
	document.write("<PARAM NAME='SeamlessTabbing' VALUE='1'>");
	document.write("<PARAM NAME='Profile' VALUE='0'>");
	document.write("<PARAM NAME='ProfileAddress' VALUE=''>");
	document.write("<PARAM NAME='ProfilePort' VALUE='0'>");
	document.write("<embed src='"+sourceUrl+"' quality='high' WMode='Transparent' width='"+objWidth+"' height='"+objHeight+"' align='middle' allowScriptAccess='sameDomain'");
	document.write("type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</OBJECT>");
}

//°øÅë¹Ìµð¾î
function EmbededMedia(idMedia,sourceUrl,objWidth,objHeight){
	document.write("<OBJECT id='"+idMedia+"' codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 type='application/x-oleobject ' height='"+objHeight+"' width='"+objWidth+"' classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 name=MediaPlayer1 bgcolor='DarkBlue' VIEWASTEXT>");
	document.write("<param name='FileName' value='"+sourceUrl+"' />");
	document.write("<embed TYPE='application/x-mplayer2' pluginspage='http://www.microsoft.com/windows/mediaplayer/en/download/Win32IE4x86.asp' Name='VodPlayer' ShowControls='0' ShowDisplay='0' ShowPositionControls='0' ShowTracker='1' Autoresize='0' ShowStatusBar='0' ClickToPlay='1' EnableFullScreenControls='1' SendKeyboardEvents='1' volume='-720' sendMouseClickEvents='1' SendMouseMoveEvents='0' width='"+objWidth+"' height='"+objHeight+"'>");
	document.write("</OBJECT>");
}

// °ø¿¬-µ¿¿µ»ó ÇÃ·¹ÀÌ¾î
function EmbededMovie(idMedia,sourceUrl,objWidth,objHeight)
{
	document.write("<OBJECT id='"+idMedia+"' type='application/x-oleobject' height='"+objHeight+"' width='"+objWidth+"'");
	document.write("classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6' VIEWASTEXT>");
	document.write("<PARAM NAME='URL' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='rate' VALUE='1'>");
	document.write("<PARAM NAME='balance' VALUE='0'>");
	document.write("<PARAM NAME='currentPosition' VALUE='-1'>");
	document.write("<PARAM NAME='defaultFrame' VALUE=''>");
	document.write("<PARAM NAME='playCount' VALUE='1'>");
	document.write("<PARAM NAME='autoStart' VALUE='0'>");
	document.write("<PARAM NAME='currentMarker' VALUE='0'>");
	document.write("<PARAM NAME='invokeURLs' VALUE='-1'>");
	document.write("<PARAM NAME='baseURL' VALUE=''>");
	document.write("<PARAM NAME='volume' VALUE='50'>");
	document.write("<PARAM NAME='mute' VALUE='0'>");
	document.write("<PARAM NAME='uiMode' VALUE='full'>");
	document.write("<PARAM NAME='stretchToFit' VALUE='-1'>");
	document.write("<PARAM NAME='windowlessVideo' VALUE='0'>");
	document.write("<PARAM NAME='enabled' VALUE='-1'>");
	document.write("<PARAM NAME='enableContextMenu' VALUE='0'>");
	document.write("<PARAM NAME='fullScreen' VALUE='0'>");
	document.write("<PARAM NAME='SAMIStyle' VALUE=''>");
	document.write("<PARAM NAME='SAMILang' VALUE=''>");
	document.write("<PARAM NAME='SAMIFilename' VALUE=''>");
	document.write("<PARAM NAME='captioningID' VALUE=''>");
	document.write("<PARAM NAME='enableErrorDialogs' VALUE='0'>");
	document.write("<PARAM NAME='_cx' VALUE='6324'>");
	document.write("<PARAM NAME='_cy' VALUE='4895'>");
	document.write("<embed id='"+idMedia+"' type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'");
	document.write("width='"+objWidth+"' height='"+objHeight+"' src='"+sourceUrl+"'");            
	document.write("ShowStatusBar='true' autostart='true' loop='false' allowScriptAccess='sameDomain'></embed></OBJECT>");
}

// °ø¿¬-»ç¿îµå ÇÃ·¹ÀÌ¾î
function EmbededSound(idSound,sourceUrl,objWidth,objHeight,objVolume)
{
	document.write("<OBJECT id='"+idSound+"' type='application/x-oleobject' height='"+objHeight+"' width='"+objWidth+"'");
	document.write("classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6' VIEWASTEXT>");
	document.write("<PARAM NAME='URL' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='rate' VALUE='1'>");
	document.write("<PARAM NAME='balance' VALUE='0'>");
	document.write("<PARAM NAME='currentPosition' VALUE='0'>");
	document.write("<PARAM NAME='defaultFrame' VALUE=''>");
	document.write("<PARAM NAME='playCount' VALUE='1'>");
	document.write("<PARAM NAME='autoStart' VALUE='0'>");
	document.write("<PARAM NAME='currentMarker' VALUE='0'>");
	document.write("<PARAM NAME='invokeURLs' VALUE='-1'>");
	document.write("<PARAM NAME='baseURL' VALUE=''>");
	document.write("<PARAM NAME='volume' VALUE='"+objVolume+"'>");
	document.write("<PARAM NAME='mute' VALUE='0'>");
	document.write("<PARAM NAME='uiMode' VALUE='full'>");
	document.write("<PARAM NAME='stretchToFit' VALUE='-1'>");
	document.write("<PARAM NAME='windowlessVideo' VALUE='0'>");
	document.write("<PARAM NAME='enabled' VALUE='-1'>");
	document.write("<PARAM NAME='enableContextMenu' VALUE='0'>");
	document.write("<PARAM NAME='fullScreen' VALUE='0'>");
	document.write("<PARAM NAME='SAMIStyle' VALUE=''>");
	document.write("<PARAM NAME='SAMILang' VALUE=''>");
	document.write("<PARAM NAME='SAMIFilename' VALUE=''>");
	document.write("<PARAM NAME='captioningID' VALUE=''>");
	document.write("<PARAM NAME='enableErrorDialogs' VALUE='0'>");
	document.write("<PARAM NAME='_cx' VALUE='6324'>");
	document.write("<PARAM NAME='_cy' VALUE='4895'>");
	document.write("<EMBED id='"+idSound+"' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'");
	document.write("src='"+sourceUrl+"' width='"+objWidth+"' height='"+objHeight+"' type='application/x-mplayer2' enableContextMenu='false' volume='"+objVolume+"'"); 
	document.write("playCount='0' showTracker='true' showPositonControls='true' showAudioControls='true' showControls='true'"); 
	document.write("loop='false' autostart='false' ShowDisplay='false' ShowStatusBar='false'></EMBED></OBJECT>");
}

var divt = '<div id=\"userInfodiv\" style=\"position:absolute; left:829px; top:98px; width:40px; height:43px; z-index:1\">';
divt += '</div>';
document.write(divt);

function MM_BrWindo(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function goHidden()
{
	userInfodiv.style.display = "none";
}

function showuserInfo(Id){
	
	if(userInfodiv.style.display == "block")
	{
		userInfodiv.style.display = "none";
		return;
	}

	if(Id !=null){
		var divtext = '<table width=\"95\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		divtext +=	'	<tr>';
		divtext +=	'		<td background=\"/image/cafe/id_box1.gif\" align=\"center\">';
		divtext +=	'		<table width=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
		divtext +=	'			<tr>';
		divtext +=	'			<td height=\"7\"></td>';
		divtext +=	'			</tr>';
		divtext +=	'			<tr>';
		divtext +=	'				<td><a href=\"#\" onClick=MM_BrWindo(\"/Home/Include/PopInfo.aspx?Id='+Id+'\",\"\",\"width=400,height=310\");goHidden();><img src=\"/image/cafe/id_info.gif\" border=\"0\"></a></td>';
		divtext +=	'			</tr>';
		divtext +=	'			<tr>';
		divtext +=	'				<td><img src=\"/image/cafe/id_dotline.gif\"></td>';
		divtext +=	'			</tr>';
		divtext +=	'			<tr>';
		divtext +=	'				<td><a href=\"#\" onClick=MM_BrWindo(\"/Home/Include/PopSendMail.aspx?Id='+Id+'\",\"\",\"width=400,height=340\");goHidden();><img src=\"/image/cafe/id_mail.gif\" border=\"0\"></a></td>';
		divtext +=	'			</tr>';
		divtext +=	'		</table>';
		divtext +=	'		</td>';
		divtext +=	'	</tr>';
		divtext +=	'	<tr>';
		divtext +=	'		<td><img src=\"/image/cafe/id_box2.gif\"></td>';
		divtext +=	'	</tr>';
		divtext +=	'</table>';
		
		var x, y;
		x = (document.layers) ? loc.pageX : event.clientX;
		y = (document.layers) ? loc.pageY : event.clientY;

		userInfodiv.style.pixelTop	= document.body.scrollTop+y;
		userInfodiv.style.pixelLeft	= x+10;
		userInfodiv.innerHTML = divtext;
		userInfodiv.style.display = "block";
	}else{
		userInfodiv.style.display = "none";
		alert('ÇØ´ç È¸¿ø Á¤º¸°¡ ¾ø½À´Ï´Ù');
	}
}

function showdownlist(BoardId)
{
	window.open('/Admin/Press/Downloadhistory.aspx?id='+BoardId, 'DOWNLOADLIST', 'Width=630,Height=600,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=1,top=100,left=200');
}

function goBankfly(){
	
	var divtext = '<table width=\"95\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
	divtext +=	'	<tr>';
	divtext +=	'		<td background=\"/image/cafe/id_box1.gif\" align=\"center\">';
	divtext +=	'		<table width=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
	divtext +=	'			<tr>';
	divtext +=	'			<td height=\"7\"></td>';
	divtext +=	'			</tr>';
	divtext +=	'			<tr>';
	divtext +=	'				<td><a href=\"http://www.nextour.co.kr/Flight_S/Flight_F/Flight_main.asp?gubuncode=america&FirstCode=CB&flightcode=001U02009\" target=_blank><img src=\"/image/life/flyout.gif\" border=\"0\"></a></td>';
	divtext +=	'			</tr>';
	divtext +=	'			<tr>';
	divtext +=	'				<td><img src=\"/image/cafe/id_dotline.gif\"></td>';
	divtext +=	'			</tr>';
	divtext +=	'			<tr>';
	divtext +=	'				<td><a href=\"http://www.nextour.co.kr/Flight_S/Flight_D/main.asp?FirstCode=CB\" target=_blank><img src=\"/image/life/flyin.gif\" border=\"0\"></a></td>';
	divtext +=	'			</tr>';
	divtext +=	'		</table>';
	divtext +=	'		</td>';
	divtext +=	'	</tr>';
	divtext +=	'	<tr>';
	divtext +=	'		<td><img src=\"/image/cafe/id_box2.gif\"></td>';
	divtext +=	'	</tr>';
	divtext +=	'</table>';
	
	var x, y;
	x = (document.layers) ? loc.pageX : event.clientX;
	y = (document.layers) ? loc.pageY : event.clientY;

	userInfodiv.style.pixelTop	= document.body.scrollTop+y+10;
	userInfodiv.style.pixelLeft	= x+15;
	userInfodiv.innerHTML = divtext;
	userInfodiv.style.display = "block";
}

function goBankhotel(){
	
	var divtext = '<table width=\"95\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
	divtext +=	'	<tr>';
	divtext +=	'		<td background=\"/image/cafe/id_box1.gif\" align=\"center\">';
	divtext +=	'		<table width=\"70\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
	divtext +=	'			<tr>';
	divtext +=	'			<td height=\"7\"></td>';
	divtext +=	'			</tr>';
	divtext +=	'			<tr>';
	divtext +=	'				<td><a href=\"http://www.nextour.co.kr/Hotel_F/main.asp?FirstCode=CB\" target=_blank onfocus=\"blur()\"><img src=\"/image/life/hotelout.gif\" border=\"0\"></a></td>';
	divtext +=	'			</tr>';
	divtext +=	'			<tr>';
	divtext +=	'				<td><img src=\"/image/cafe/id_dotline.gif\"></td>';
	divtext +=	'			</tr>';
	divtext +=	'			<tr>';
	divtext +=	'				<td><a href=\"http://www.nextour.co.kr/Hotel_D/main.asp?FirstCode=CB\" target=_blank onfocus=\"blur()\"><img src=\"/image/life/hotelin.gif\" border=\"0\"></a></td>';
	divtext +=	'			</tr>';
	divtext +=	'		</table>';
	divtext +=	'		</td>';
	divtext +=	'	</tr>';
	divtext +=	'	<tr>';
	divtext +=	'		<td><img src=\"/image/cafe/id_box2.gif\"></td>';
	divtext +=	'	</tr>';
	divtext +=	'</table>';
	
	var x, y;
	x = (document.layers) ? loc.pageX : event.clientX;
	y = (document.layers) ? loc.pageY : event.clientY;

	userInfodiv.style.pixelTop	= document.body.scrollTop+y+10;
	userInfodiv.style.pixelLeft	= x+15;
	userInfodiv.innerHTML = divtext;
	userInfodiv.style.display = "block";
}

function ConfirmPOPUP(iKind)
{
	if(iKind == "NotEqual")
		window.open('/Home/Member/LoginMsg02.aspx','ConfirmNotEqual','width=400,height=186,left=100,top=30,scrollbars=no,resizable=no,topmargin=0 leftmargin=0');
	else if (iKind == "NotID")
		window.open('/Home/Member/LoginMsg03.aspx','ConfirmNotID','width=400,height=186,left=100,top=30,scrollbars=no,resizable=no,topmargin=0 leftmargin=0');
}
