function opn_win(URL,W,H) {
	var win;
	win = window.open(URL, 'NewWin', 'toolbar=no,location=no,directoryies=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+W+',height='+H);
}

function ChangeSize(size) {
	var i, lnklst;
	var b_class = {
		'm'	: 'head_r02',
		'l'	: 'head_r03'
	};
	
	if(!size) size = get_cook('fontSize');
	
	for(i=0; (lnklst = document.getElementsByTagName("link")[i]); i++) {
		if(lnklst.getAttribute("rel").indexOf("stylesheet")  && lnklst.getAttribute("title")) {
			lnklst.disabled = true;
			
			document.getElementById(lnklst.getAttribute("title")).className = b_class[lnklst.getAttribute("title")];
			sav_cook(size);
			if(lnklst.getAttribute("title") == size){
				
				lnklst.disabled = false;
				document.getElementById(lnklst.getAttribute("title")).className = b_class[size] + '_on';
			}
		}
	}
}

function get_cook(coknam) {
  coktxt = document.cookie+";";
  stano = coktxt.indexOf(coknam);
  if (stano != -1){
    endno = coktxt.indexOf(";",stano);
    txt0 = unescape(coktxt.substring(stano+coknam.length+1,endno));
  }else{
    txt0 = "";
  }
  return txt0;
}

function sav_cook(value) {
	var coknam = 'fontSize';
	day0 = new Date();
	day0.setTime(day0.getTime()+60*60*24*1000);
	endday = day0.toGMTString();
	document.cookie = coknam+"="+escape(value)+";expires="+endday + ';path=/';
}

window.onload = function(){
	ChangeSize();
}