function ShowFlash2(url, width, height){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<param name="wmode" value="window">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}


function ShowFlash(url, width, height){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<param name="wmode" value="transparent">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}

function ShowFlash3(url, width, height){
        document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '" VIEWASTEXT>');
        document.write('<param name="movie" value="' + url + '">');
        document.write('<param name="quality" value="high">');
        document.write('<param name="wmode" value="opaque">');
        document.write('<embed src="' + url + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed>');
        document.write('</object>');
}


 
	
	function fun_logout(shop_id)
    {
        str =  '예약사이트를 로그아웃합니다. ';
        result = confirm(str);

        if(result == true)
        {
            location.href = 'logout.php?shop_id='+shop_id;
        }
    }

	// 달력 함수
    function fun_calendar(tar_day,tag,img_name)
    {
    	var sor = eval('document.'+tar_day);
		sor_day = sor.value;

       	url = 'calendar.php?tar_day='+tar_day+'&sor_day='+sor_day+'&tag='+tag;
        pop_frame_cal.location.href = url;

    	yy = 0;
    	xx = 0;
		if(img_name!=null)
		{
			obj = eval('document.all.'+img_name);
  			var newX = 0; 
  			var newY = 0; 
  			if (obj.offsetParent) 
			{ 
      			while (obj.offsetParent) 
				{ 
        			newX += obj.offsetLeft; 
        			newY += obj.offsetTop; 
        			obj = obj.offsetParent; 
      			} 
  			} 
			else if(obj.x) 
			{ 
      			newX += obj.x; 
      			newY += obj.y; 
  			} 
    		yy = newY + 20;
    		xx = newX - 120;
		}

		document.all.popCal.style.pixelTop = yy;
		document.all.popCal.style.pixelLeft = xx;
		document.all.popCal.style.visibility = 'visible';
    }



	// 문자발송
    function fun_sms_post(send_number,receive_number,sms_contents)
    {
        url = 'sms_post.php?send_number='+send_number+'&receive_number='+receive_number+'&sms_contents='+sms_contents;

        window.open(url,'win_sms_send','width=182,height=400,top=150,left=150,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
    }



	function copy(val)
	{
		val_txt = ' COPY : ' + val;
		alert(val_txt);
		window.clipboardData.setData('Text', val);
	}

    function fun_pop_image_view(img_file)
    {
        url = 'pop_image_view.php?img_file='+img_file;
        window.open(url,'pop_image_view','width=100,height=100,top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
    }

	function fun_postcode(num)
	{
		window.open('post_find.php?type='+num,'win_post','width=415,height=265,top=190,left=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	}



    function fun_room_view(num)
    {
        //url = 'http://familove.co.kr/web/m02_04_pop.php?room_num='+num;
		url = 'room_view.php?room_num='+num;
        window.open(url,'pop_room_view_view','width=730,height=600,top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes');
    }



var TRange=null;

function findString (obj) 
{
	var f_str = eval(obj);
	var str = f_str.value;

	if(str=='') { alert('찾을 문자열을 입력해 주세요 ');  return; }
 
	if (parseInt(navigator.appVersion)<4) return;
	var strFound;
	if (navigator.appName=="Netscape") 
	{
		// NAVIGATOR-SPECIFIC CODE
		strFound=self.find(str);
		if (!strFound) 
		{
		   strFound=self.find(str,0,1)
		   while (self.find(str,0,1)) continue
		}
	}

	if (navigator.appName.indexOf("Microsoft")!=-1) 
	{
		// EXPLORER-SPECIFIC CODE
		if (TRange!=null) 
		{
			TRange.collapse(false)
			strFound=TRange.findText(str)
			if (strFound) TRange.select()
		}

		if (TRange==null || strFound==0) 
		{
			TRange=self.document.body.createTextRange()
			strFound=TRange.findText(str)
		   if (strFound) TRange.select()
		}
	}

	if (!strFound) alert ("문자열 [ '"+str+"' ] 을(를) 찾을 수 없습니다.")
}

