// Å¸ÀÌÆ²---------
document.title="**¾Æ¸§´ä°í ÀÌ±¹ÀûÀÎ Á¦ÁÖ¹Ù´å°¡ÇÏ¾áÁý**";


/* ¸µÅ© Á¡¼± Á¦°Å */
function bluring(){
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


//ÇÃ·¡½ÃÃâ·Â-------------------------------------------------------------------------------------
// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå) 

function flashWrite(url,w,h,id,bg,vars,win){ 

 // ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ 
 var flashStr= 
 "<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+"' align='middle'>"+ 
 "<param name='allowScriptAccess' value='always' />"+ 
 "<param name='movie' value='"+url+"' />"+ 
 "<param name='FlashVars' value='"+vars+"' />"+ 
 "<param name='wmode' value='"+win+"' />"+ 
 "<param name='wmode' value='opaque'>"+  
 "<param name='menu' value='false' />"+ 
 "<param name='quality' value='high' />"+ 
 "<param name='bgcolor' value='"+bg+"' />"+ 
 "<param name='wmode' value='transparent'>"+
 "<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' value='opaque' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ 
 "</object>"; 

 // ÇÃ·¡½Ã ÄÚµå Ãâ·Â 
 document.write(flashStr); 

} 


//µ¿¿µ»ó-------------------------------------------------------------------------------------
function moviePlay(src,w,h) { 
document.write('<embed src="'+src+'" width='+w+' height='+h+' Volume="0" Showtracker="0" ShowPositionControls="0" Showstatusbar="0" AUTOSTART="-1" style="FILTER: gray()alpha(opacity=40,style=1,finishopacity=40)">') 
}

function VR(uri, w, h){
	html  = "";
	html += "<OBJECT ID='PLUGIN1' style=\"WIDTH: "+w+"px; HEIGHT: "+h+"px\"    codeBase=http://www.devalvr.com/instalacion/plugin/devalocx.cab#version=0,3,1,4 width="+w+"  height="+h+" classid=clsid:5D2CF9D0-113A-476B-986F-288B54571614>";
	html += "	<PARAM NAME=\"src\"				VALUE=\""+uri+"\">";
	html += "	<PARAM NAME=\"rotationx\"       VALUE=\"0\">";
	html += "	<PARAM NAME=\"rotationy\"       VALUE=\"100\">";
	html += "	<PARAM NAME=\"zoom\"            VALUE=\"0.6\">";
	html += "	<PARAM NAME=\"minzoom\"         VALUE=\"0.4\">";
	html += "	<PARAM NAME=\"maxzoom\"         VALUE=\"1.3\">";
	//html += "	<PARAM NAME=\"grayscale\"       VALUE=\"1\">";
	html += "	<PARAM NAME=\"language\"		VALUE=\"korean\">";
	html += "	<PARAM NAME=\"abouturl\"		VALUE=\"http://www.design-boom.com\">";
	html += "	<EMBED NAME=\"PLUGIN1\"   TYPE='application/x-devalvrx' 	PLUGINSPAGE='http://www.devalvr.com/instalacion/plugin/install.html' src='"+uri+"'	width='"+w+"' height='"+h+"'></EMBED>";
	html += "</OBJECT>";
	
	document.write(html);
}

function AutoPlayVR(){
     document.PLUGIN1.Commands("menu","play");
}


function GetVRNewObject(uri){
	html  = "";
	html += "<OBJECT ID='PLUGIN1' style=\"WIDTH: 576px; HEIGHT: 340px\"    codeBase=http://www.devalvr.com/instalacion/plugin/devalocx.cab#version=0,3,1,4 width=700  height=550 classid=clsid:5D2CF9D0-113A-476B-986F-288B54571614>";
	html += "	<PARAM NAME=\"src\"				VALUE=\""+uri+"\">";
	html += "	<PARAM NAME=\"rotationx\"       VALUE=\"0\">";
	html += "	<PARAM NAME=\"rotationy\"       VALUE=\"100\">";
	html += "	<PARAM NAME=\"zoom\"            VALUE=\"0.6\">";
	html += "	<PARAM NAME=\"minzoom\"         VALUE=\"0.4\">";
	html += "	<PARAM NAME=\"maxzoom\"         VALUE=\"1.3\">";
	//html += "	<PARAM NAME=\"grayscale\"       VALUE=\"1\">";
	html += "	<PARAM NAME=\"language\"		VALUE=\"korean\">";
	html += "	<PARAM NAME=\"abouturl\"		VALUE=\"http://www.design-boom.com\">";
	html += "	<EMBED NAME=\"PLUGIN1\"   TYPE='application/x-devalvrx' 	PLUGINSPAGE='http://www.devalvr.com/instalacion/plugin/install.html' src='"+uri+"'	width='700' height='550'></EMBED>";
	html += "</OBJECT>";
	
	document.write(html);
}

function AutoplayOnOff(){
     document.PLUGIN1.Commands("menu","play");
}

//¿¹½Ã <script>flashWrite('./image/swf/sub1.swf','100%','300','sub1','#ffffff','','transparent')</script>
//ÆË¾÷ ÄÚµå ¸µÅ©½Ã ¿¹½Ã href="javascript:new_window('win', 'ÆÄÀÏ¸í', ÁÂ, »ó, °¡·Î, ¼¼·Î, 0, 0, 0, 0, 0);"

/*** ·¹ÀÌ¾î ÆË¾÷Ã¢ ¶ç¿ì±â ***/
function popupLayer(s,w,h){
	if (!w) w = 700;
	if (!h) h = 500;

	var pixelBorder = 3;
	var titleHeight = 12;
	w += pixelBorder * 2;
	h += pixelBorder * 2 + titleHeight;

	var bodyW = document.body.clientWidth;
	var bodyH = document.body.clientHeight;

	var posX = (bodyW - w) / 2;
	var posY = (bodyH - h) / 2;

	hiddenSelectBox('hidden');

	/*** ¹é±×¶ó¿îµå ·¹ÀÌ¾î ***/
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		zIndex = 3;
		left = 0;
		top = 0;
		width = "100%";
		height = document.body.scrollHeight;
		backgroundColor = "#000000";
		filter = "Alpha(Opacity=50)";
		opacity = "0.5";
	}
	obj.id = "objPopupLayerBg";
	document.body.appendChild(obj);

	/*** ³»¿ëÇÁ·¹ÀÓ ·¹ÀÌ¾î ***/
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		zIndex = 4;
		left = posX + document.body.scrollLeft;
		top = posY + document.body.scrollTop;
		width = w;
		height = h;		
		backgroundColor = "#000000";
		border = "3px solid #000000";
	}
	obj.id = "objPopupLayer";
	document.body.appendChild(obj);

	/*** Å¸ÀÌÆ²¹Ù ·¹ÀÌ¾î ***/
	var bottom = document.createElement("div");
	with (bottom.style){
		position = "absolute";
		zIndex = 4;
		width = w - pixelBorder * 2;
		height = titleHeight;
		left = 0;
		top = h - titleHeight - pixelBorder * 3;
		padding = "4px 0 0 0";
		textAlign = "right";
		backgroundColor = "#000000";
		color = "#ffffff";
		font = "11px µ¸¿ò";
	}
	bottom.innerHTML = "<a href='javascript:closeLayer()'><font color='FFF54D'><b>CLOSE</b></font></a>&nbsp;&nbsp;&nbsp;";
	obj.appendChild(bottom);

	/*** ¾ÆÀÌÇÁ·¹ÀÓ ***/
	var ifrm = document.createElement("iframe");
	with (ifrm.style){
		width = w - 6;
		height = h - pixelBorder * 2 - titleHeight - 3;
		//border = "3 solid #000000";
	}
	ifrm.frameBorder = 0;
	ifrm.src = s;
	//ifrm.className = "scroll";
	obj.appendChild(ifrm);
}

function _ID(obj){
	return document.getElementById(obj)
}

function hiddenSelectBox(mode){
	var obj = document.getElementsByTagName('select');
	for (i=0;i<obj.length;i++){
		obj[i].style.visibility = mode;
	}
}

function closeLayer(){
	hiddenSelectBox('visible');
	_ID('objPopupLayer').parentNode.removeChild( _ID('objPopupLayer') );
	_ID('objPopupLayerBg').parentNode.removeChild( _ID('objPopupLayerBg') );
}

function vr1(){
	popupLayer("vr/vr.html?no=1", 750, 450);
}

function vr2(){
	popupLayer("vr/vr.html?no=2", 750, 450);
}

function vr3(){
	popupLayer("vr/vr.html?no=3", 750, 450);
}

function vr4(){
	popupLayer("vr/vr.html?no=4", 750, 450);
}

function vr5(){
	popupLayer("vr/vr.html?no=5", 750, 450);
}

function vr6(){
	popupLayer("vr/vr.html?no=6", 750, 450);
}

function vr7(){
	popupLayer("vr/vr.html?no=7", 750, 450);
}


//½Ç½Ã°£¿¹¾à
function realtimeReserv() {
	popupLayer("http://devs.ting.ne.kr/realtime/main.php?pension=lamaison", 750, 580);
	//var window_left = (screen.width-750)/2;
	//var window_top = (screen.height-580)/2;
	//window.open('http://devs.ting.ne.kr/realtime/main.php?pension=gang2625', 'cat_win', 'width=' + 750 + ', height=' + 580 + ', status=no scrollbars=yes, top=' + window_top + ',left=' + window_left + ',scrollbars=yes');
}