/*
ÆÄÀÏ¸í : View.js
¼³¸í : ÆË¾÷ ¹× ¾ÆÀÌµð/¿ìÆí¹øÈ£ °Ë»ö ÀÚ¹Ù½ºÅ©¸³Æ®
*/

// È®ÀÎ/Ãë¼Ò
function confirmsg_go(msg, url){
  if ( confirm (msg)) {
    location.replace(url);
  }
}

//ÆË¾÷1
function makeWin(url, winname, width, height, scrolltype){
   xposition=0; yposition=0;
   if (parseInt(navigator.appVersion) >= 4){
      xposition = (screen.width - width) / 2;
      yposition = (screen.height - height) / 2;
   }
   args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0,"
         + "scrollbars=" + scrolltype + "," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0,"
   + "screenx=" + xposition + ","  //NN Only
   + "screeny=" + yposition + ","  //NN Only
   + "left=" + xposition + ","     //IE Only
   + "top=" + yposition;           //IE Only

   newWin=window.open(url,winname,args)
   newWin.focus();
}

//ÆË¾÷2 - À§Ä¡ ÁöÁ¤
function makeWin1(url, winname, width, height, scrollbars, xposition1, yposition1,ck){
   xposition=0; yposition=0;
   if (parseInt(navigator.appVersion) >= 4){
      xposition = (screen.width - width) / 2;
      yposition = (screen.height - height) / 2;
   }
   if (scrollbars == null){
      scrollbars = '0';
   }
   args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0,"
         + "scrollbars=" + scrollbars + "," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0,"
   + "screenx=" + xposition + ","  //NN Only
   + "screeny=" + yposition + ","  //NN Only
   + "left=" + xposition1 + ","     //IE Only
   + "top=" + yposition1;           //IE Only

   newWin=window.open(url,winname,args,ck)
   newWin.focus();
}


function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



  //ÀÌ¹ÌÁö»çÀÌÁî
  function resize(img, size) { //ÀÌ¹ÌÁö Å×·¯ ¹æÁö¿ë ÀÌ¹ÌÁö ¸®»çÀÌÁî °¡·Î 500ÀÌ»óÀº 500À¸·Î ÁÙÀÓ
	if(img.width > size){
		var realwidth=img.width;
		var realwidth2=(size/(img.width))*100;
		var height=parseInt(realwidth2*(img.height)/100);

		img.width = size;
		img.height = height;
	}
  }

  //ÇÃ·¡½¬ ¶óÀÎ
function swf(src, width, height) {
 html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
  ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"' +
  ' width="' + width + '" height="' + height + '">';
 html += '<param name="movie" value="' + src + '" />';
 html += '<param name="quality" value="high" />';
 html += '<param name="wmode" value="transparent" />';
 html += '<embed src="' + src + '" quality="high"' +
  ' pluginspage="http://www.macromedia.com/go/getflashplayer"' +
  ' type="application/x-shockwave-flash"' +
  ' width="' + width + '" height="' + height + '"></embed>';
 html += '</object>';
 document.write(html);
}
