function goLink() {
	var frm = document.link_form;
	
	if(frm.link.value != "") {
		window.open(frm.link.value);
	}
}

function getCookie(name) {
  var Found = false
  var start, end
  var i = 0

  while(i <= document.cookie.length) {
    start = i
    end = start + name.length

    if(document.cookie.substring(start, end) == name) {
      Found = true
      break
    }
    i++
  }

  if(Found == true) {
    start = end + 1
    end = document.cookie.indexOf(";", start)
      if(end < start)
        end = document.cookie.length
    return document.cookie.substring(start, end)
  }
  return ""
}

//È¨ÆäÀÌÁö ÆË¾÷ Àá±Ý//
//if ( getCookie( "popup_20110608" ) !="done") {
//	window.open('/popup/popup_20110608.html','popup_20110608','left=200, top=320, width=380,height=485,toolbar=no,menubar=no,scrollbars=no,status=no,resizable=no,location=no');
//} //È¨ÆäÀÌÁö ¿ÀÇÂ ¾Ë¸²


//°£È£»çÃ¤¿ë°ø°í[°Ô½ÃÀÏ 2011.08.02~]
//if ( getCookie( "popup_20110802" ) !="done") {
//	window.open('/popup/popup_20110802.html','popup_20110802','left=200, top=320, width=500,height=675,toolbar=no,menubar=no,scrollbars=no,status=no,resizable=no,location=no');
//} 


function openWindow(anchor, options) {

	var args = '';

	if (typeof(options) == 'undefined') { var options = new Object(); }
	if (typeof(options.name) == 'undefined') { options.name = 'win' + Math.round(Math.random()*100000); }

	if (typeof(options.height) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
		args += "height=" + options.height + ",";
	}

	if (typeof(options.width) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
		args += "width=" + options.width + ",";
	}

	if (typeof(options.fullscreen) != 'undefined') {
		args += "width=" + screen.availWidth + ",";
		args += "height=" + screen.availHeight + ",";
	}

	if (typeof(options.center) == 'undefined') {
		options.x = 0;
		options.y = 0;
		args += "screenx=" + options.x + ",";
		args += "screeny=" + options.y + ",";
		args += "left=" + options.x + ",";
		args += "top=" + options.y + ",";
	}

	if (typeof(options.center) != 'undefined' && typeof(options.fullscreen) == 'undefined') {
		options.y=Math.floor((screen.availHeight-(options.height || screen.height))/2)-(screen.height-screen.availHeight);
		options.x=Math.floor((screen.availWidth-(options.width || screen.width))/2)-(screen.width-screen.availWidth);
		args += "screenx=" + options.x + ",";
		args += "screeny=" + options.y + ",";
		args += "left=" + options.x + ",";
		args += "top=" + options.y + ",";
	}

	if (typeof(options.scrollbars) != 'undefined') { args += "scrollbars=1,"; }
	if (typeof(options.menubar) != 'undefined') { args += "menubar=1,"; }
	if (typeof(options.locationbar) != 'undefined') { args += "location=1,"; }
	if (typeof(options.resizable) != 'undefined') { args += "resizable=1,"; }

	var win = window.open(anchor, options.name, args);
	return false;

}
