
//Ç®´Ù¿î ¸Þ´º·Î »çÀÌÆ® ÀÌµ¿ÇÏ±â
      function redirect(form) {
         location.href=form.targetSite.options[form.targetSite.selectedIndex].value
      }


//ÁØºñÁß ¾È³»
function msg(){
 alert('ÁË¼ÛÇÕ´Ï´Ù. ÁØºñÁßÀÔ´Ï´Ù. \n Sorry, This Item is under construction.')
 }


//±×¸²Å©±â¿¡ µû¶ó »õÃ¢¶ß±â
function view(what) { 
var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=0,location=no,menu=no,width=10,height=10'); 
imgwin.focus(); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title>*¿¡¼¾½Ã¾Æ*</title>\n"); 

imgwin.document.write("<sc"+"ript>\n"); 
imgwin.document.write("function resize() {\n"); 
imgwin.document.write("pic = document.il;\n"); 
//imgwin.document.write("alert(eval(pic).height);\n"); 
imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 12;\n"); 
imgwin.document.write("  } else { myHeight = eval(pic).height+ 9; myWidth = eval(pic).width; }\n"); 
imgwin.document.write("  clearTimeout();\n"); 
imgwin.document.write("  var height = screen.height;\n"); 
imgwin.document.write("  var width = screen.width;\n"); 
imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
imgwin.document.write("  var toppos = height / 2 - myHeight / 2; \n"); 
imgwin.document.write("  self.moveTo(leftpos, toppos);\n"); 
imgwin.document.write("  self.resizeTo(myWidth, myHeight);\n"); 
imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
imgwin.document.write("</sc"+"ript>\n"); 

imgwin.document.write("</head>\n"); 
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF" onclick="self.close()">\n'); 

imgwin.document.write("<img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();'>\n"); 
imgwin.document.write("</body>\n"); 
imgwin.document.close(); 
}
 

 // topÀ¸·Î ¿Ã¸®±â
function namosw_init_float_layers()
{
  var name;
  var layer;
  var i;
  var j;

  j = 0;
  document._float_layers = new Array(Math.max(1, namosw_init_float_layers.arguments.length/2));
  for (i = 0; i < namosw_init_float_layers.arguments.length; i += 2) {
    name  = namosw_init_float_layers.arguments[i];
    if (name == '')
      return;
    if (navigator.appName.indexOf('Netscape', 0) != -1) {
      layer = document.layers[name];
      layer._fl_pos_left = layer.left;
      layer._fl_pos_top  = layer.top;
    } else {
      layer = document.all[name];
      layer._fl_pos_left = layer.style.pixelLeft;
      layer._fl_pos_top  = layer.style.pixelTop;
    }
    layer._fl_pos = namosw_init_float_layers.arguments[i+1];
    if (layer)
      document._float_layers[j++] = layer;
  }

  document._fl_interval = setInterval('namosw_process_float_layers()', 200);
}

function namosw_page_width()
{
  return (navigator.appName.indexOf('Netscape', 0) != -1) ? innerWidth  : document.body.clientWidth;
}

function namosw_page_height()
{
  return (navigator.appName.indexOf('Netscape', 0) != -1) ? innerHeight : document.body.clientHeight;
}

function namosw_process_float_layers()
{
  if (document._float_layers) {
      var i;
      var layer;
      for (i = 0; i < document._float_layers.length; i++) {
	  layer = document._float_layers[i];
	  if (navigator.appName.indexOf('Netscape', 0) != -1) {
	    if (layer._fl_pos == 1)
	      layer.left = layer._fl_pos_left + window.pageXOffset;
	    else if (layer._fl_pos == 2 || layer._fl_pos == 5) 
	      layer.left = window.pageXOffset;
	    else if (layer._fl_pos == 3 || layer._fl_pos == 6) 
	      layer.left = window.pageXOffset + (namosw_page_width() - layer.clip.width)/2;
	    else
	      layer.left = window.pageXOffset + namosw_page_width() - layer.clip.width - 16;
	    if (layer._fl_pos == 1)
	      layer.top = layer._fl_pos_top + window.pageYOffset;
	    else if (layer._fl_pos == 2 || layer._fl_pos == 3 || layer._fl_pos == 4)
	      layer.top = window.pageYOffset;
	    else
	      layer.top  = window.pageYOffset + namosw_page_height() - layer.clip.height;
	  } else {
	    if (layer._fl_pos == 1)
	      layer.style.pixelLeft = layer._fl_pos_left + document.body.scrollLeft;
	    else if (layer._fl_pos == 2 || layer._fl_pos == 5)
	      layer.style.pixelLeft = document.body.scrollLeft;
	    else if (layer._fl_pos == 3 || layer._fl_pos == 6)
	      layer.style.pixelLeft = document.body.scrollLeft + (namosw_page_width() - layer.style.pixelWidth)/2;
	    else
	      layer.style.pixelLeft = document.body.scrollLeft + namosw_page_width()  - layer.style.pixelWidth;
	    if (layer._fl_pos == 1)
	      layer.style.pixelTop = layer._fl_pos_top + document.body.scrollTop;
	    else if (layer._fl_pos == 2 || layer._fl_pos == 3 || layer._fl_pos == 4)
	      layer.style.pixelTop = document.body.scrollTop;
	    else
	      layer.style.pixelTop  = document.body.scrollTop  + namosw_page_height() - layer.style.pixelHeight;
         }
      }
  }
}

function AdCornerMove ()
{
if (isLoaded == 0)
{
return;
}
if (isMSIE)
{
nAdCornerOriginX = document.body.clientWidth - idAdCorner.width - nAdCornerMarginX;
nAdCornerOriginY = document.body.clientHeight - idAdCorner.height - nAdCornerMarginY;

nAdCornerOriginX += document.body.scrollLeft;
nAdCornerOriginY += document.body.scrollTop;

idAdCorner.style.pixelLeft = nAdCornerOriginX;
idAdCorner.style.pixelTop = nAdCornerOriginY;
}
else
{
nAdCornerOriginX = window.innerWidth + window.pageXOffset - wCur.clip.width - nAdCornerMarginX;
nAdCornerOriginY = window.innerHeight + window.pageYOffset - wCur.clip.height - nAdCornerMarginY;

if (window.scrollbars.visible == true)
{
nAdCornerOriginX -= nScrollBarWidth;
nAdCornerOriginY -= nScrollBarHeight;
}

wCur.left = nAdCornerOriginX;
wCur.top = nAdCornerOriginY;
}
}

//¸¶¿ì½º·Î ½ºÅ©·ÑÇÏ±â
var pre_x = 0, pre_y = 0;
function set_value()
{
 pre_x = event.x;
 pre_y = event.y;
}

function move()
{
 var delta_x = pre_x - event.x ;
 var delta_y = pre_y - event.y ;
 
 pre_x = event.x;
 pre_y = event.y
 
 window.scrollBy(delta_x,delta_y);
}

//new window
function winpopup12(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history11.htm","popup","width=660,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup11(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history10.htm","popup","width=660,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup10(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history9.htm","popup","width=660,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup9(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history7.htm","popup","width=660,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup1(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history1.htm","popup","width=900,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup2(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history2.htm","popup","width=900,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup3(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history3.htm","popup","width=900,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup4(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history4.htm","popup","width=900,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup5(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history5.htm","popup","width=900,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup6(){
	window.open("http://image.comcatalog.com/users/esensia/htm/history6.htm","popup","width=900,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup7(){
	window.open("http://catalog.comcatalog.com/HtmlFormMailer/FormMailer.aspx?template=esen_large","popup","width=619,height=500,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function winpopup8(){
	window.open("http://image.comcatalog.com/users/esensia/htm/contact.htm","popup","width=629,height=500,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}

function sense1(){
	window.open("http://image.comcatalog.com/users/esenshop/popup/sense1.htm","popup","width=600,height=400,left=200,top=200,status=no,scrollbars=no,resizable=no");
}
function event2(){
	window.open("http://image.comcatalog.com/users/esenshop/popup/event2.htm","popup","width=400,height=373,left=100,top=100,status=no,scrollbars=no,resizable=no");
}
function event3(){
	window.open("http://image.comcatalog.com/users/esenshop/popup/event3.htm","popup","width=400,height=375,left=100,top=100,status=no,scrollbars=no,resizable=no");
}


function test1(){
	window.open("http://image.comcatalog.com/users/esensia/htm/test1.htm","popup","width=429,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function test2(){
	window.open("http://image.comcatalog.com/users/esensia/htm/test2.htm","popup","width=429,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function test3(){
	window.open("http://image.comcatalog.com/users/esensia/htm/test3.htm","popup","width=429,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function test4(){
	window.open("http://image.comcatalog.com/users/esensia/htm/test4.htm","popup","width=430,height=650,left=0,top=0,status=yes,scrollbars=no,resizable=yes");
}
function catalog1(){
	window.open("http://image.comcatalog.com/users/esensia/e_catalog/e_catalog.htm","popup","width=389,height=311,left=0,top=0,status=no,scrollbars=no,resizable=no");
}
function event_popup(){
	window.open("http://image.comcatalog.com/users/esensia/event/event.htm","popup","width=450,height=479,left=20,top=20,status=no,scrollbars=no,resizable=no, toolbar=no");
}


//À©µµ¿ì ½½¶óÀÌµù µÇ¸ç ¿Å±â±â
	var x = 0;
	var dest = 0;
	var distance = 0;
	var step = 0;
	var destination = 0;

function scrollset(destination) {
		step = 2;
		dest = destination;
		if (x<dest) {
			while (x<dest) {
				step += (step / 5000);
				x += step;
				this.scroll(x,0);
			} 
			this.scroll(dest,0);
			x = dest;
		}
		
    	if (x > dest)  {
			while (x>dest) {
				step += (step / 5000);
                if(x >= (0+step))
				  {
				    x -= step; 
					this.scroll(x,0);
                  }
				    else { break;  }
			} 
			if(dest >= 0) { this.scroll(dest,0); }
			x = dest;
		}	
		if (x<1) {x=1}
		if (x>100000	) {x=10000}		
}


