/*
document.write("<table>");
document.write("	<tr>");
document.write("		<td align='right'>");
document.write("			<img src='/resources/images/main/font_up.gif' border=0 alt='±ÛÀÚÈ®´ë' style='cursor:hand' onClick='jsZoomFont(+1);' onfocus='this.blur()' />");
document.write("			<img src='/resources/images/main/font_down.gif' border=0 alt='±ÛÀÚÃà¼Ò' style='cursor:hand' onClick='jsZoomFont(-1);' onfocus='this.blur()' />");
document.write("			<img src='/resources/images/main/print.gif' align='absmiddle' alt='ÇÁ¸°Æ®' style='cursor:pointer' onClick='jsPrintPopup();' onfocus='this.blur()' />");
document.write("		</td>");
document.write("	</tr>");
document.write("</table>");
*/

/*
document.write("<img src='/resources/images/main/font_up.gif' align='absmiddle' alt='±ÛÀÚÈ®´ë' style='cursor:pointer' onClick='jsZoomIn();' onfocus='this.blur()' /> ");
document.write("<img src='/resources/images/main/font_down.gif' align='absmiddle' alt='±ÛÀÚÃà¼Ò' style='cursor:pointer' onClick='jsZoomOut();' onfocus='this.blur()' /> ");
document.write("<img src='/resources/images/main/print.gif' align='absmiddle' alt='ÇÁ¸°Æ®' style='cursor:pointer' onClick='jsPrintPopup();' onfocus='this.blur()' />");
*/

// ÇÁ¸°Æ® ÆäÀÌÁö (ÆË¾÷)
var printHtml = "/inc/commons/commonPrint.html";

// ¹®ÀÚÈ®´ë, Ãà¼Ò
var mFirst=[9,15];	
var mFont;
var cFont;
var moFirst, mClass;

// ÃÊ±âÈ­
jsZoomFont(0)

function jsZoomFont(n) {
	var mFont = jsGetCookie("cFont"); 
	mFont = parseInt(mFont);
	n = parseInt(n);
	mFont += n;
	var class_name="main01";
	if (mFont<mFirst[0]) mFont = mFirst[0];
	if (mFont>mFirst[1]) mFont = mFirst[1];
	
	// tdÀÇ ÆùÆ® Á¶Àý
	moFirst = document.getElementsByTagName("td");
	mClass = class_name ? class_name : "Sfont";

	objs=moFirst;
	for (i=0;i<objs.length;i++) {
		try {
			objs[i].style.fontSize=mFont+'pt';
			if (initFlag) moFirst[i]=objs[i];
		} catch(e) {}
	}

	// aÀÇ ÆùÆ® Á¶Àý
	moFirst = document.getElementsByTagName("a");
	mClass = class_name ? class_name : "Sfont";

	objs = moFirst;
	for ( i=0 ; i < objs.length ; i++ ) {
		try {
			objs[i].style.fontSize = mFont+'pt';
			if (initFlag) moFirst[i] = objs[i];
		} catch(e) {}
	}

	jsSetCookie("cFont", mFont , 1); 
}


function jsPrintPopup() {
    var width = 735;
    var height = 600;
	var x, y;
	var screen_width  = screen.width;
	var screen_height = screen.height;
	x = (screen_width  / 2) - (width  / 2);
	y = (screen_height / 2) - (height / 2);
	window.open ( printHtml,"","width=" + width + ", height=" + height + ", left=" + x + ", top=" + y + ", toolbar=no, status=no, menubar=yes, scrollbars=yes, resizable=yes");
	return;
}

function jsMailPopup() {
	alert('¾ÆÁ÷ Áö¿øÇÏÁö ¾Ê½À´Ï´Ù.');
	/*
    var width = 735;
    var height = 600;
	var x, y;
	var screen_width  = screen.width;
	var screen_height = screen.height;
	x = (screen_width  / 2) - (width  / 2);
	y = (screen_height / 2) - (height / 2);
	window.open ( "/gworks_admin/inc/commons/sendmailPopup.html","","width=" + width + ", height=" + height + ", left=" + x + ", top=" + y + ", toolbar=no, status=no, menubar=no, scrollbars=yes, resizable=yes");
	*/
	return;
}

function jsSetCookie( name, value, expiredays ) {
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays ); 
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
}

function jsGetCookie(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 0;
}