function setbookmark()
{
  window.external.AddFavorite("http://www.today.kr/","Åõµ¥ÀÌÃ¢¾÷°æÁ¦½Å¹®");
}

function sethomepage()
{
  if(document.all) {
    document.body.style.behavior='url(#default#homepage)';
    document.body.setHomePage('http://www.today.kr/');
  }
}

function check_all(checked)
{
  for(var i=0;i<document.form1.elements.length;i++)
  {  
     var e = document.form1.elements[i];
     if (e.name.search("_list\\[") >= 0) {
        e.checked = checked;
     }
  }
}

var article_fontSize = 10;
// var lineHeight = 2;

function fontResize(value) {
	if(value == 0) {
		if (article_fontSize >= 9) {
			article_fontSize = article_fontSize - 1; 
			setFaceSize(); 
		} 
	} else if(value == 1) {
		if (article_fontSize < 16) {
			article_fontSize = article_fontSize + 1; 
			setFaceSize(); 
		} 
	} else if(value == 2) {
		article_fontSize = 10;
		setFaceSize();
	}
	return false;
}

function setFaceSize() {
	lineHeight = article_fontSize+Math.round(1.1*article_fontSize);

	obj = document.getElementById("article_body");
	obj.style.fontSize = article_fontSize+"pt";
//	obj.style.lineHeight = lineHeight+"px"
}

function getStyleObject(objectId) {
  // checkW3C DOM, then MSIE 4, then NN 4.
  //
  if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
   }
   else if (document.all && document.all(objectId)) {  
	return document.all(objectId).style;
   } 
   else if (document.layers && document.layers[objectId]) { 
	return document.layers[objectId];
   } else {
	return false;
   }
}

function getObject(objectId) {
  // checkW3C DOM, then MSIE 4, then NN 4.
  //
  if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId);
   }
   else if(document.getElementByName && document.getElementByName(objectId)) {
	return document.getElementByName(objectId);
   }
   else if (document.all && document.all(objectId)) {  
	return document.all(objectId);
   } 
   else if (document.layers && document.layers[objectId]) { 
	return document.layers[objectId];
   } else {
	return false;
   }
}

function changeObjectVisibility(objectId, newVisibility) {
    // first get a reference to the cross-browser style object 
    // and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	// we couldn't find the object, so we can't change its visibility
		return false;
    }
}

function displayText(objectId, text){
	if (document.all) {
	document.all[objectId].innerHTML = text;
	}
	else
	{
	var obj = document.getElementById(objectId);
	obj.innerHTML = text;  
	}
}

function openWindow(url, width, height, windowname) {
	window.open(url, windowname, "width="+width+",height="+height);
	return false;
}

function openWindow2(url, width, height, windowname) {
	window.open(url, windowname, "scrollbars=yes,width="+width+",height="+height);
	return false;
}


