/********************************************************************
Vricks Republic Publishing S&A
Beginning : 2009-10-16
Final : 2009-10-30
*********************************************************************/

var tempUrl				= "/common/flash/xml/";
var sessionXmlPath		= tempUrl + "session.xml";
var linkXmlPath			= tempUrl + "link.xml";
var linkXmlPath2			= tempUrl + "linkNew.xml";
var mapPath				= tempUrl + "map.xml";
var gnbBannerXmlPath	= tempUrl + "gnbBanner.xml";
var mainNewsXmlPath		= tempUrl + "mainContents.xml";
var gnbVars	= "";
	gnbVars = "sessionXmlPath=" + sessionXmlPath + "&linkXmlPath=" + linkXmlPath + "&gnbBannerXmlPath=" + gnbBannerXmlPath;

function embedSwf(embedSwf, swfWidth, swfHeight, swfId, flaVars, pageCode) {
	var flashValue = "";
	if(swfId == "ham_lnb"){
	  flaVars = "xmlPath="+ linkXmlPath +"&mapPath="+ mapPath;
	}
	flashValue += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + swfWidth + '" height="' + swfHeight + '" id="' + swfId + '">\n';
	flashValue += '<param name="allowScriptAccess" value="always" />\n';
	flashValue += '<param name="allowFullScreen" value="true" />\n';
	flashValue += '<param name="movie" value="' + embedSwf + '" />\n';
	flashValue += '<param name="quality" value="high" />\n';
	flashValue += '<param name="wmode" value="transparent" />\n';
	flashValue += '<param name="flashvars" value="' + flaVars + "&pageCode=" + pageCode + '" />\n';
	flashValue += '<embed src="' + embedSwf + '" quality="high" wmode="transparent" width="' + swfWidth + '" height="' + swfHeight + '" name="'+ swfId +'" allowScriptAccess="always" allowFullScreen="true" flashvars="' + flaVars + "&pageCode=" + pageCode + '" />\n';
	flashValue += '</object>\n';
	document.write(flashValue);
}

function embedSwfNoVars(embedSwf, swfWidth, swfHeight, swfId) {
	var flashValue = "";
	flashValue += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + swfWidth + '" height="' + swfHeight + '" id="' + swfId + '">\n';
	flashValue += '<param name="allowScriptAccess" value="always" />\n';
	flashValue += '<param name="allowFullScreen" value="true" />\n';
	flashValue += '<param name="movie" value="' + embedSwf + '" />\n';
	flashValue += '<param name="quality" value="high" />\n';
	flashValue += '<param name="wmode" value="transparent" />\n';
	flashValue += '<embed src="' + embedSwf + '" quality="high" wmode="transparent" width="' + swfWidth + '" height="' + swfHeight + '" name="'+ swfId +'" allowScriptAccess="always" allowFullScreen="true" />\n';
	flashValue += '</object>\n';
	document.write(flashValue);
}

function gnbOver() {
	document.getElementById("gnb").style.zIndex = "20";
	if(navigator.userAgent.indexOf("MSIE 6.0") != -1) {
		var sel = document.getElementsByTagName("select");
		for(i=0; i<sel.length; i++) {
			if(sel[i].className.indexOf("selBug") != -1) {
				sel[i].style.visibility = "hidden";
			}
		}
	}
}

function gnbOut() {
	document.getElementById("gnb").style.zIndex = "0";
	if(navigator.userAgent.indexOf("MSIE 6.0") != -1) {
		var sel = document.getElementsByTagName("select");
		for(i=0; i<sel.length; i++) {
			sel[i].style.visibility = "visible";
		}
	}
}

function goGuide(){
//	alert("logOutUser");
//	location.href="/etc/event/20100301/index.html";
	window.open('/etc/event/20100301/index.html', 'event')
}

function logOutUser(){
//	alert("logOutUser");
  location.href="/util/logout.asp";
}

// * 퀵메뉴 전국 함소아 위치찾기 버튼 클릭
function quickFindMap(content){
//	alert("quickFindMap: "+content);
	switch(content) {
	  case "0101" : window.open('http://www.jshamsoa.com');								break;
	  case "0102" : document.location.href = './store/store_info_view.html?b_idx=1';	break;
	  case "0103" : document.location.href = './store/store_info_view.html?b_idx=12';	break;
	  case "0105" : document.location.href = './store/store_info_view.html?b_idx=36';	break;
	  case "0106" : document.location.href = './store/store_info_view.html?b_idx=2';	break;
	  case "0107" : document.location.href = './store/store_info_view.html?b_idx=54';	break;
	  case "0108" : document.location.href = './store/store_info_view.html?b_idx=24';	break;
	  case "0109" : document.location.href = './store/store_info_view.html?b_idx=41';	break;
	  case "0110" : document.location.href = './store/store_info_view.html?b_idx=15';	break;
	  case "0111" : document.location.href = './store/store_info_view.html?b_idx=18';	break;
	  case "0112" : document.location.href = './store/store_info_view.html?b_idx=65';	break;
	  case "0113" : document.location.href = './store/store_info_view.html?b_idx=59';	break;

	  case "0201" : document.location.href = './store/store_info_view.html?b_idx=46';	break;
	  case "0202" : document.location.href = './store/store_info_view.html?b_idx=37';	break;
	  case "0203" : document.location.href = './store/store_info_view.html?b_idx=4';	break;
	  case "0204" : document.location.href = './store/store_info_view.html?b_idx=14';	break;
	  case "0205" : document.location.href = './store/store_info_view.html?b_idx=52';	break;
	  case "0206" : document.location.href = './store/store_info_view.html?b_idx=57';	break;
	  case "0207" : document.location.href = './store/store_info_view.html?b_idx=19';	break;
	  case "0208" : document.location.href = './store/store_info_view.html?b_idx=9';	break;
	  case "0209" : document.location.href = './store/store_info_view.html?b_idx=58';	break;
	  case "0210" : document.location.href = './store/store_info_view.html?b_idx=68';	break;
	  case "0211" : document.location.href = './store/store_info_view.html?b_idx=8';	break;
	  case "0212" : document.location.href = './store/store_info_view.html?b_idx=64';	break;
	  case "0213" : document.location.href = './store/store_info_view.html?b_idx=72';	break;
	  case "0204" : document.location.href = './store/store_info_view.html?b_idx=3';	break;
	  case "0215" : document.location.href = './store/store_info_view.html?b_idx=40';	break;
	  case "0216" : document.location.href = './store/store_info_view.html?b_idx=69';	break;

	  case "0301" : document.location.href = './store/store_info_view.html?b_idx=70';	break;

	  case "0401" : document.location.href = './store/store_info_view.html?b_idx=7';	break;
	  case "0402" : document.location.href = './store/store_info_view.html?b_idx=35';	break;
	  case "0403" : document.location.href = './store/store_info_view.html?b_idx=51';	break;

	  case "0501" : document.location.href = './store/store_info_view.html?b_idx=48';	break;
	  case "0502" : document.location.href = './store/store_info_view.html?b_idx=50';	break;
	  case "0503" : document.location.href = './store/store_info_view.html?b_idx=6';	break;
	  case "0504" : document.location.href = './store/store_info_view.html?b_idx=11';	break;
	  case "0505" : document.location.href = './store/store_info_view.html?b_idx=47';	break;
	  case "0506" : document.location.href = './store/store_info_view.html?b_idx=17';	break;
	  case "0507" : document.location.href = './store/store_info_view.html?b_idx=21';	break;
	  case "0508" : document.location.href = './store/store_info_view.html?b_idx=43';	break;
	  case "0509" : document.location.href = './store/store_info_view.html?b_idx=55';	break;

	  case "0601" : document.location.href = './store/store_info_view.html?b_idx=16';	break;
	  case "0602" : document.location.href = './store/store_info_view.html?b_idx=60';	break;
	  case "0603" : document.location.href = './store/store_info_view.html?b_idx=45';	break;
	  case "0604" : document.location.href = './store/store_info_view.html?b_idx=20';	break;

	  case "0701" : document.location.href = './store/store_info_view.html?b_idx=44';	break;
	  default	  : break;
	}
}


// 플래시 높이 조절
function lnbFlashHeight(heightNum){
//	alert(heightNum);
	document.getElementById('lnb').style.height = heightNum;
}


// 검색 버튼 클릭
function searchKeywords(content){
	alert(content);
}




function viewRandscape(value){
	var url = encodeURIComponent(value);
	//주변볼거리 클릭시 해당 지점명을 데이타로 넘겨주는 함수
	location.href="store_subway.html?bunwon_name="+url;
}

function getMovieName(movieName) {
	if (document.all) {
		return window[movieName]
	}
	else {
		return document[movieName]
	}
}

function resetBoardA(xmlPath){
	getMovieName("boardA").resetBoard(xmlPath);
	//플래시객체.resetBoard("xml의 URL");
	//플래시의 게시판을 갱신할때 실행하는 함수
}

function resetBoardB(xmlPath){
	getMovieName("boardB").resetBoard(xmlPath);
	//플래시객체.resetBoard("xml의 URL");
	//플래시의 게시판을 갱신할때 실행하는 함수
}

function copyURL(value){
  //alert("블로그로 퍼가기(index): "+value);
  if(value == "3"){
	_process.location.href="./blog_process.asp?obj=cureContent"
  }else{
	_process.location.href="./blog_process.asp?obj=breedContent"
  }
}

function cunsultOnline(){
	//온라인 상담받기
	location.href="/customer/disease_list.html"
}

function reserveMedical(){
	//온라인 진료예약하기
	location.href="/customer/reserve_1.html"
}


function requestShot(){
 window.name="_mainTarget";
  var theURL="/life/photographing.html";
  var winName="userS";
  var w="650"  // 팝업 싸이즈 조절
  var h="500"
  var x=(screen.width) ? (screen.width-w)/2 : 0;  // 팝업 위치 조절
  var y=(screen.height) ? (screen.height-h)/2 : 0;
 
  var features="resizable=yes, scrollbars=no, width="+ w +", height="+ h +", left="+ x +", top="+ y; 
  
  window.open(theURL,winName,features);


 
}



