
function allblur() {
	if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
}
document.onfocusin = allblur;


title = "Boryeong Ubiquitous Travel City ::::: 보령, 유비쿼터스 관광도시";	//페이지 타이틀



//***** 플래쉬 부분 *****
// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 변수)
function flashWrite(url,w,h,id,bg,vars){

	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='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	//"<param name='bgcolor' value='"+bg+"' />"+
	"<param name='wmode' value='transparent' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' menu='false' quality='high' wmode='transparent' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	document.write(flashStr);
}



function createParam (name,value) {
  var param = document.createElement("param");
  param.setAttribute("name", name);
  param.setAttribute("value", value);
  return param;
}

function makeDiv(){
  if(document.getElementById("movie")==undefined) {
	  var div_1 = document.createElement("div");
	  var div_2 = document.createElement("div");
	  var div_3 = document.createElement("div");
	  
	  div_2.setAttribute("id", "mov");
	  
	  var codeWrapper = document.createElement("div");
	
	  if(navigator.userAgent.match(/MSIE/gi)!=null) {
	    var object = document.createElement("object");;
	    object.setAttribute("width", 320);
	    object.setAttribute("height", 240);
	    //object.setAttribute("type", "application/x-shockwave-flash");
	    object.setAttribute("classid", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000");
	    object.setAttribute("codebase", "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0");
	    object.appendChild(createParam("movie", "../img/flash/main_mov.swf"));
	    object.appendChild(createParam("flashvars", ""));
	    object.appendChild(createParam("menu", "false"));
	    object.appendChild(createParam("quality", "high"));
	    object.appendChild(createParam("wmode", "transparent"));
	    object.appendChild(createParam("allowScriptAccess", "always"));
	    //object.appendChild(createParam("swliveconnect", "true"));
	  }else{
	    var object = document.createElement("embed");
	    object.setAttribute("width", 320);
	    object.setAttribute("height", 240);
	    object.setAttribute("src", "../img/flash/main_mov.swf");
	    object.setAttribute("flashvars", "");
	    object.setAttribute("menu", "false");
	    object.setAttribute("quality", "high");
	    object.setAttribute("wmode", "transparent");
	    object.setAttribute("type", "application/x-shockwave-flash");
	    object.setAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
	  }
	  codeWrapper.appendChild(object);
	  div_2.innerHTML = codeWrapper.innerHTML;
	
	  div_3.setAttribute("id", "close_bottom");
	  var table = document.createElement("table");
	  var tbody = document.createElement("tbody");
	  var tr = document.createElement("tr");
	  var td_1 = document.createElement("td");
	  var td_2 = document.createElement("td");
	  
	  td_1.innerHTML = "";
	  td_2.innerHTML = "<img src='../img/main/mov_bt_close02.gif' width='50' height='18' alt='�ݱ�' onclick='document.body.removeChild(document.getElementById(\"movie\"));' style='cursor:pointer;'>";
	  td_2.setAttribute("align", "right");
	  
	  tr.appendChild(td_1);
	  tr.appendChild(td_2);
	  
	  tbody.appendChild(tr);
	  table.appendChild(tbody);
	  table.setAttribute("width", "58%");
	  
	  div_3.appendChild(table);
	  
	  div_1.appendChild(div_2);
	  div_1.appendChild(div_3);
	  div_1.setAttribute("id", "movie");
	
	  div_1.style.position="absolute";
	  div_1.style.top="310";
	  div_1.style.left="268";
	  
	  document.body.appendChild(div_1);
  }
  
}
