function printFlash(url, width, height) {
				document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
				document.write('<param name="movie" value="'+url+'" />																																	   ');
				document.write('<param name="wmode" value="transparent" />																																			   ');
				document.write('<param name="quality" value="high" />																																				   ');
				document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>		   ');
				document.write('</object>																																											   ');
}
function printFlashBranch(url, width, height, ctgry_cd) {
				document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
				document.write('<param name="movie" value="'+url+'" />                                                                                                                                ');
				document.write('<param name="quality" value="high" />                                                                                                                                                 ');
				document.write('<param name="FlashVars" value="ctgry_cd='+ctgry_cd+'" />                                                                                                        ');
				document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>  ');
				document.write('</object>                                                                                                                                                                             ');
}
function printFlashMain(url, width, height, num) {
				document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'">');
				document.write('<param name="movie" value="'+url+'" />                                                                                                                                ');
				document.write('<param name="quality" value="high" />                                                                                                                                                 ');
				document.write('<param name="FlashVars" value="num='+num+'" />                                                                                                        ');
				document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed>  ');
				document.write('</object>                                                                                                                                                                             ');
}

function jsPrint()
{
    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);
	var pop = window.open ( "/include/for_print.html","print","width=" + width + ", height=" + height + ", left=" + x + ", top=" + y + ", toolbar=no, status=no, menubar=no, scrollbars=yes, resizable=yes");
	pop.focus();
	return;
}

// ÆË¾÷¿­±â
 function popup(theURL,winName,features) { //v2.0
   window.open(theURL,winName,features);
 }
 
// ÆË¾÷¿­±â
 function popup2(theURL,winName,features) { //v2.0
   window.open(theURL,winName,features);
 } 
// ÇÃ·¡½¬¿¡¼­ »õÃ¢À¸·Î ÆË¾÷¿­±â

function flashbutton00 () {
window.open('/notice/notice_01.jsp','_self','');
}
function flashbutton01 () {
window.open('http://www.agros.go.kr/callcenter/callcenter_info.jsp','_blank','');
}

function flashbutton02 () {
window.open('http://www.agros.go.kr/callcenter/callcenter_info.jsp','_blank','');
}

function flashbutton03 () {

}

function flashbutton04 () {
window.open('http://www.agros.go.kr/callcenter/callcenter_info.jsp','_blank','');
}

function goBlog(){
	var query = document.search.query.value;
	if(query == "" ){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		document.search.query.focus();
		if(ret == "true"){
			return false;
		}else{
			return;
		}
	}
	window.open("http://green.daum.net/search/searchOrganGreenResult.jsp?qry="+query+"&coll=organ&siteid=2","SearchResult","");
}




/* ÀÌÀü ÇÁ·¹ÀÓ»çÀÌÁî Á¶Á¤ */
function resizeFrame(iframeObj){
	var innerBody = iframeObj.contentWindow.document.body;
	oldEvent = innerBody.onclick;
	innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	iframeObj.style.height = innerHeight;
	var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	iframeObj.style.width = innerWidth;     
	if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
	this.scrollTo(1,1);
}


/*  ÀÌ°Íµµ ¿Ãµå..
function frameResize(frameName) {
	try {
		var oBody = eval(frameName + '.document.body');
		var oFrame = eval('document.all.' + frameName);
		oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight)+10;
	}
	catch(e) {
		alert(e);
	}
}
*/


var NS4;
var IE4;
var sUserAgent = navigator.userAgent;
var isOpera = sUserAgent.indexOf("Opera") > -1;
var isIE = sUserAgent.indexOf("compatible") > -1 
           && sUserAgent.indexOf("MSIE") > -1
           && !isOpera;

if (isIE)
{
    IE4 = true;
    NS4 = false;
}
else
{
    IE4 = false;
    NS4 = true;
}
var agent = navigator.userAgent.toLowerCase();
var isIE = (agent.indexOf("msie") != -1) && (agent.indexOf("opera") == -1) && (agent.indexOf("webtv") == -1);

/** @id $Agent */
function getAgent() {
	var isOpera = !!(window.opera);
	var nu = navigator.userAgent;
	var isIE = !isOpera && /MSIE/.test(nu), ie5=false, ie55=false, ie6=false, ie7=false, macIE=false;
	
	if (isIE) {
		/MSIE ([0-9\.]+)/.exec(nu);
		var ver = parseFloat(RegExp.$1);
		switch (ver) {
			case 5   : ie5 =true; break;
			case 5.5 : ie55=true; break;
			case 6   : ie6=true; break;
			case 7   : ie7=true; break;
			default  :
		}
	}
	
	return {
		IE     : isIE,
		IE5    : isIE && ie5,
		IE55   : isIE && ie55,
		IE6    : isIE && ie6,
		IE7    : isIE && ie7,
		macIE  : isIE && macIE,
		Gecko  : /Gecko/.test(nu),
		Opera  : isOpera,
		Safari : /WebKit/.test(nu),
		KHTML  : /KHTML/.test(nu)
	};
}

var frmMinWidth;
var frmMinHeight;
var applyMinSize = false;
var frmMaxWidth;
var frmMaxHeight;
var applyMaxSize = false;
function setMinSize(width, height)
{
    frmMinWidth = width;
    frmMinHeight = height
    applyMinSize = true;
}
function setMaxSize(width, height)
{
    frmMaxWidth = width;
    frmMaxHeight = height
    applyMaxSize = true;
}
/* ³×ÀÌ¹ö ÇÁ·¹ÀÓ»çÀÌÁî Á¶Á¤ ¼Ò½º */
function frameResize(name, userHtmlScroll)
{
	var oFrame;
    if (typeof name == 'string')
    {
        oFrame = document.getElementById(name);
    } else {
        oFrame = document.getElementById(name.id);
	}
	if ( userHtmlScroll === undefined )	//¹«½¼¿ëµµÀÎÁö ¸ð¸£°Î³ß.. ÇÏ¿©°£. true ·Î ÇØ¾ß 6.0 ¿¡¼­ Á¤»óÀ¸·Î ³ª¿È.
	{	
		userHtmlScroll = true;
	}
	
    try
    {
    	//var oTarget;
		if (IE4) {	
			/*
			var oFrameHtml = oFrame.document.getElementsByTagName('HTML')[0];
			var oFrameBody = oFrame.document.getElementsByTagName('BODY')[0];
			
			//IE5.5¿¡¼­´Â htmlÀÇ scrollHeight °ªÀÌ ´Ù¸£´Ù.
			if (userHtmlScroll && ! getAgent().IE55)
				oTarget = oFrameHtml;
			else
				oTarget = oFrameBody;
			
			
			
			alert('\toFrameBody.scrollHeight:'+oFrameBody.scrollHeight+
					'\n\toFrameBody.offsetHeight:'+oFrameBody.offsetHeight+
					'\n\toFrameBody.clientHeight:'+oFrameBody.clientHeight+
					'\n\toFrameHtml.clientHeight:'+oFrameHtml.clientHeight+
					'\n\tcaf.scrollHeight:'+oFrameBody.scrollHeight + (oFrameBody.offsetHeight - oFrameBody.clientHeight)+10);
			*/

			//find the height of the internal page
			var the_height= oFrame.contentWindow.document.body.scrollHeight;

			//change the height of the iframe
			if(the_height == 0)
			  the_height=500;
			oFrame.height = the_height;

			//oFrame.width = window.frames[name].document.body.scrollWidth;
			//oFrame.height = window.frames[name].document.body.scrollHeight;
			//oFrame.width = oTarget.scrollWidth;			
			//oFrame.height = oTarget.scrollHeight;
			//¾Æ·¡·Î ´ëÃ¼ÇÔ.. ³×ÀÌ¹ö ¼Ò½º¿¡ ¹®Á¦°¡ ÀÖÀ½.. onload ÀÌº¥Æ®°¡ Á¤»óÀ¸·Î ¸ÔÁö ¾ÊÀ½.
			//oFrame.style.height = oFrameBody.scrollHeight + (oFrameBody.offsetHeight - oFrameBody.clientHeight)+10;
			
        } else {
            var oBody = oFrame.contentDocument.documentElement;
			
	        var frmWidth  = oBody.scrollWidth;
	        var frmHeight = oBody.scrollHeight;
	        if (applyMinSize)
	        {
	            frmWidth  = Math.max(frmWidth, frmMinWidth);
	            frmHeight = Math.max(frmHeight, frmMinHeight);
	        }
	        if (applyMaxSize)
	        {
	            frmWidth  = Math.min(frmWidth, frmMaxWidth);
	            frmHeight = Math.min(frmHeight, frmMaxHeight);
	        }
	
	        oFrame.height = frmHeight+10;
			alert(oFrame.height);
	        oFrame.width = frmWidth;
		}
    }catch (e) {
		//window.status=e.message;
	}
}



