function flash(source,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+'">    <param name="menu" value="false"/>  <param name="movie" value="' + source + '"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="' + source + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '"></embed></object>');
}

function display_scroll() {
		this.name = "display_scroll";
		this.item = new Array();
		this.itemcount = 0;
		this.currentspeed = 0;
		this.scrollspeed = 50;
		this.pausedelay = 1000;
		this.pausemouseover = false;
		this.stop = false;
		this.type = 1;
		this.height = 100;
		this.width = 100;
		this.stopHeight=0;
		this.add =function () {
			var text = arguments[0];
			this.item[this.itemcount] = text;
			this.itemcount = this.itemcount + 1;
		};
		this.start = function () {
			this.display();
			this.currentspeed = this.scrollspeed;
			setTimeout(this.name+'.display_scroll()',this.currentspeed);
		};
		this.display =function () {
			document.write('<div id="'+this.name+'" style="height:'+this.height+';width:'+this.width+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
			for(var i = 0; i < this.itemcount; i++) {if ( this.type == 1) {
					document.write('<div id="'+this.name+'item'+i+'"style="left:0px;width:'+this.width+';position:absolute;top:'+(this.height*i+1)+'px;">');
					document.write(this.item[i]);
					document.write('</div>');
				}
				else if ( this.type == 2 ) {
					document.write('<div id="'+this.name+'item'+i+'"style="left:'+(this.width*i+1)+'px;width:'+this.width+';position:absolute;top:0px;">');
					document.write(this.item[i]);
					document.write('</div>');
				}
			}
			document.write('</div>');
		};
		this.display_scroll = function () {
			this.currentspeed = this.scrollspeed;if ( !this.stop ) {
				for (i = 0; i < this.itemcount; i++) {
					obj = document.getElementById(this.name+'item'+i).style;if ( this.type == 1 ) {
						obj.top = parseInt(obj.top) - 1;
						if ( parseInt(obj.top) <= this.height*(-1) ) obj.top = this.height * (this.itemcount-1);
						if ( parseInt(obj.top) == 0 || ( this.stopHeight > 0 && this.stopHeight - parseInt(obj.top) == 0 ) ) this.currentspeed = this.pausedelay;
					}
					else if ( this.type == 2 ) {
						obj.left = parseInt(obj.left) - 1;
						if ( parseInt(obj.left) <= this.left*(-1) ) obj.left = this.left* (this.itemcount-1);
						if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay;
					}
				}
			}
			window.setTimeout(this.name+".display_scroll()",this.currentspeed);
		};
		this.onmouseover = function () {
			if ( this.pausemouseover ) {
			this.stop = true;}
		};
		this.onmouseout = function () {
			if ( this.pausemouseover ) {
				this.stop = false;
			}
		};
	}


function display_scrolls(strs)
{
	cont = new display_scroll();
	cont.name = "cont";
	cont.height = 20;
	cont.width = "100%";
	cont.scrollspeed = 20;
	cont.pausedelay = 5000;
	cont.pausemouseover = true;
	var arr_str = strs.split("^^^^")
	for(i=0;i<arr_str.length;i++)
	{
		cont.add(arr_str[i]);
	}
	cont.start(); 
}

function view_dr(id)
{
	window.open('http://www.skinland.com/html/main_dr_view.php?id='+id,'main_dr','width=400,height=300');
}



function realOK(){
	var f = document.realForm;
	if (f.name.value==""){
		alert("ÀÌ¸§ÀÌ ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		f.name.focus();
		return;
	}
	if (f.tel1.value=="" || f.tel2.value=="" || f.tel3.value==""){
		alert("ÀüÈ­¹øÈ£¸¦ ¸ðµÎ ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		return;
	}
	if (f.yy.value==""){
		alert("ÀÏ½Ã[³â]¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		f.yy.focus();
		return;
	}
	if (f.mm.value==""){
		alert("ÀÏ½Ã[¿ù]¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		f.mm.focus();
		return;
	}
	if (f.dd.value==""){
		alert("ÀÏ½Ã[ÀÏ]¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		f.dd.focus();
		return;
	}
	if (f.tt.value==""){
		alert("ÀÏ½Ã[½Ã°£]¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä~");
		f.tt.focus();
		return;
	}
	if (f.area.value==""){
		alert("ÁöÁ¡À» ¼±ÅÃÇØÁÖ¼¼¿ä~");
		f.area.focus();
		return;
	}
	if(f.agr_mem.checked==false)
	{
		alert("°³ÀÎ Á¤º¸ ¼öÁý µ¿ÀÇÇØ ÁÖ¼¼¿ä");
		f.agr_mem.focus();
		return false;
	}

	f.action = "../html/realtime_save.php";
	f.submit();
}


function smssendarea(f)
{
	if (f.name.value==""){
		alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		f.name.focus();
		return false;
	}
	if (f.tel1.value=="" || f.tel2.value=="" || f.tel3.value==""){
		alert("ÀüÈ­¹øÈ£¸¦ ¸ðµÎ ÀÔ·ÂÇØÁÖ¼¼¿ä~");
		return false;
	}
	if (f.area.value==""){
		alert("ÁöÁ¡À» ¼±ÅÃÇØÁÖ¼¼¿ä~");
		f.area.focus();
		return false;
	}

}


function CheckUIElements()
{
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;
                yButtonFrom = parseInt (floater.style.top, 10);
                yButtonTo   = document.body.scrollTop + 120// + document.body.clientHeight - 500;
        timeoutNextCheck = 1;
        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("CheckUIElements()", timeoutNextCheck);
                return;
        }
        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;
                        floater.style.top = parseInt (floater.style.top, 10) + yOffset;
                timeoutNextCheck = 1;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;
                        floater.style.top = parseInt (floater.style.top, 10) + yOffset;
                  timeoutNextCheck = 1;
        }
        setTimeout ("CheckUIElements()", timeoutNextCheck);
}	

function GetXY(aTag)
{
  var oTmp = aTag;
  var pt = new Point(0,0);
	do
	{
  		pt.x += oTmp.offsetLeft+2;
	  	pt.y += oTmp.offsetTop;
		oTmp = oTmp.offsetParent;
	 }
	 while(oTmp.tagName!="BODY");
  return pt;
}

function xy(a,b)
{	
  var point = fGetXY(a);
  with(b.style)
  {
  	left = point.x;
	top  = point.y+a.offsetHeight;
	display = "block";
  }
}
function Point(iX, iY)
{
	this.x = iX;
	this.y = iY;
}


// ·Ñ¿À¹ö ÀÌ¹ÌÁö ½ºÅ©¸³Æ® 091217
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) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); 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];}
}
// ·Ñ¿À¹ö ÀÌ¹ÌÁö ½ºÅ©¸³Æ® 091217