//ÇÃ·¡½ÃÁ¦³×·¹ÀÌÅÍ...id,³ÐÀÌ,³ôÀÌ,Åõ¸í¿©ºÎ,Å©·Î½ºµµ¸ÞÀÎÇã¿ë
function FlashGen(id,w,h,url,transPparent,arrowDomain){
//alert(url)
//var _globlURL="/Flash/";
//var _globlURL="/Flash/";
var url=url;
if(arrowDomain){
var arrowDomainT="always";
}else{
var arrowDomainT="always";
}
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width="+w+" height="+h+" id='"+id+"'>")
document.write("<param name='movie' value='"+url+"'/>");
document.write("<param name='quality' value='high' />");
if(!transPparent){
document.write("<param name='wmode' value='transparent' />");
}
document.write("<param name='allowScriptAccess' value='"+arrowDomainT+"' />");
document.write("<embed src='"+url+"' quality='high' wmode='transparent' width="+w+" height="+h+" name='"+id+"' align='middle' allowScriptAccess='"+arrowDomainT+"' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />");
document.write("</object>");

}
function popup(url,cw,ch,scroll,resize) {
    //»õÃ¢ÀÇ Å©±â
   
    //½ºÅ©¸°ÀÇ Å©±â
    var sw=screen.availWidth;
    var sh=screen.availHeight;
    //¿­ Ã¢ÀÇ Æ÷Áö¼Ç
    var px=(sw-cw)/2;
   var py=(sh-ch)/2;
    //Ã¢À» ¿©´ÂºÎºÐ
    window.open(''+url+'','½Å±âÇÑÁý','left='+px+',top='+py+',width='+cw+',height='+ch+',toolbar=no,menubar=no,status=no,scrollbars='+scroll+',resizable='+resize);
}
function pop_sn(url,w,h,n) {
	l = (screen.width) ?	(screen.width-w) / 2	: 0;
	t = (screen.height) ?	(screen.height-h) / 2 : 0;	
	var opt='top='+t+',left='+l+',width='+w+',height='+h;
	opt=opt+',toolbar=no,status=no,directories=no,scrollbars='+n+',location=no,resizable=no,menubar=no';
	aa=window.open(url,'',opt);
	aa.document.write("<html><head></head><body topmargin='0' leftmargin='0'><img src='"+url+"' border='0' onClick='window.close();' style='cursor:hand' alt='¸¶¿ì½º¸¦ Å¬¸¯ÇÏ¸é Ã¢ÀÌ ´ÝÄ¨´Ï´Ù'></body></html>")
//alert()
}
// »ó±ÇÁ¤º¸ ½Ã½ºÅÛ
function pop_map() {
	try{
	
	  var cw=screen.availWidth; //È­¸é ³Êºñ
	  var ch=screen.availHeight; //È­¸é ³ôÀÌ
	  var sw=1000;  //¶ç¿ï Ã¢ÀÇ ³Êºñ
	  var sh=700;   //¶ç¿ï Ã¢ÀÇ ³ôÀÌ
	
	  var ml=(cw-sw)/2;   //°¡¿îµ¥ ¶ç¿ì±âÀ§ÇÑ Ã¢ÀÇ xÀ§Ä¡
	  var mt=(ch-sh)/2;   //°¡¿îµ¥ ¶ç¿ì±âÀ§ÇÑ Ã¢ÀÇ yÀ§Ä¡ 
	
		//window.open("http://sg.smba.go.kr/lite/","gisNVG", "width="+sw+",height="+sh+",top=" + mt + ",left=" + ml);
	
	window.open("","gisNVG", "width="+sw+",height="+sh+",top=" + mt + ",left=" + ml);
        document.frmLogin.action = "http://sg.smba.go.kr/lite/";
        document.frmLogin.target="gisNVG";
        document.frmLogin.submit();

	}catch(e){
		alert(e);
	}
}

//5´Ü°è ÆÐÅ°Áö Ã¢¾÷Áö¿ø ÇÁ·Î±×·¥
function pop_5step() {
	 //window.open("/educationFP/index04.sbdc","5step","toolbar=no,scrollbars=yes,location=no,status=no,width="+815+",height="+700+",resizable=no") ;
	 location.href = "/support/package/packageView.jsp";
}

//ÀÚ¿µ¾÷ ÄÁ¼³ÆÃ 
	function getCookie(name) {
		var nameOfCookie = name + '=';
		var x = 0
		
		while ( x <= document.cookie.length ) {
			var y = (x+nameOfCookie.length);
			if ( document.cookie.substring( x, y ) == nameOfCookie ) {
				if ( (endOfCookie=document.cookie.indexOf( ';',y )) == -1 )
					endOfCookie = document.cookie.length;
				return unescape( document.cookie.substring(y, endOfCookie ) );
			}
			x = document.cookie.indexOf( ' ', x ) + 1;
			if ( x == 0 ) break;
		}
		return '';
	}

function consultPop(){
	newconsult=window.open("/consultPop/main.sbdc","newconsult","width=1020,height=700,left=0,top=0, scrollbars=Yes");
	//newconsult.focus(); 
	
	if(getCookie("selfbiz") != "done" ){ 
  	  	window.open("/popup/popup_selfbiz.jsp","popup_selfbiz","width=323 ,height=180, left=0,top=0");
		} 
	
}
 
//º»¹® ÇÁ¸°Æ®

function content_print() {
	window.print();
}

//SPI ¹è³Ê ÇÃ·¡½¬
function swf_view(swf_name,swf_width,swf_height){
	 var text ='';
	 text ='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+swf_width+'" height="'+swf_height+'" alt="">';
	 text +='<param name="movie" value="'+swf_name+'">';
	 text +='<param name="quality" value="high">';
	 text +='<embed src="'+swf_name+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+swf_width+'" height="'+swf_height+'">';
     text +='</embed></object>';
	 document.write(text);
}

//·Î±×ÀÎÃ¢ Open
function popLogin() {
	window.login.style.display='block';
	document.frmLogin.id.focus();
}
function quickOpen(s){
	var m1=document.getElementById("divMenu")
	var m2=document.getElementById("quickF")
	var w=66
	if(s=="open"){
	m1.style.left=890-w
	m1.style.width=74+w
	}else{
	m1.style.left=890
	m1.style.width=74
	} 
}
//##########################################################################
//##########################################################################
//##########################################################################
//##########################½ºÅ©·Ñ¸Þ´º######################################
//##########################################################################
//##########################################################################
//##########################################################################
/*************************************************************************
* Scrolling Top Button				ex) InitializeStaticMenu();
*************************************************************************/

// ½ºÅ©·Ñ¸Þ´ºÀÇ ÁÂÃø À§Ä¡ 
var stmnGAP1 = 290;
// ÆäÀÌÁö Çì´õºÎºÐÀÇ ¿©¹é 
var stmnGAP2 = 100;
// ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú »ó´Ü°ú ¾à°£ ¶ç¿ò. ÇÊ¿ä¾øÀ¸¸é 0À¸·Î ¼¼ÆÃ 
var stmnBASE = 290;
// ½ºÅ©·Ñ¸Þ´º ÃÊ±â ½ÃÀÛÀ§Ä¡ (¾Æ¹«·¸°Ô³ª ÇØµµ »ó°üÀº ¾øÁö¸¸ stmnGAP1°ú ¾à°£ Â÷ÀÌ¸¦ ÁÖ´Â°Ô º¸±â ÁÁÀ½) 
var stmnActivateSpeed = 200;
// ¿òÁ÷ÀÓÀ» °¨ÁöÇÏ´Â ¼Óµµ (¼ýÀÚ°¡ Å¬¼ö·Ï ´Ê°Ô ¾Ë¾ÆÂ÷¸²) 
var stmnScrollSpeed = 2;
// ½ºÅ©·ÑµÇ´Â ¼Óµµ (Å¬¼ö·Ï ´Ê°Ô ¿òÁ÷ÀÓ) 
var stmnBOTTOMGAP = 0;
// Ç²ÅÍ ¿µ¿ª ÁöÁ¤
var stmnTimer;
var divM=document.getElementById("divMenu")
function RefreshStaticMenu() {
	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
	stmnStartPoint = parseInt(divM.style.top, 10);
	stmnEndPoint = document.body.scrollTop+stmnGAP2;
	stmnLimit = parseInt(window.document.body.scrollHeight)-parseInt(divM.offsetHeight)-stmnBOTTOMGAP;
	if (stmnEndPoint>stmnLimit) {
		stmnEndPoint = stmnLimit;
	}
	if (stmnEndPoint<stmnGAP1) {
		stmnEndPoint = stmnGAP1;
	}
	stmnRefreshTimer = stmnActivateSpeed;
	if (stmnStartPoint != stmnEndPoint) {
		stmnScrollAmount = Math.ceil(Math.abs(stmnEndPoint-stmnStartPoint)/15);
		divM.style.top = parseInt(divM.style.top, 10)+((stmnEndPoint<stmnStartPoint) ? -stmnScrollAmount : stmnScrollAmount);
		stmnRefreshTimer = stmnScrollSpeed;
	}
	stmnTimer = setTimeout("RefreshStaticMenu();", stmnRefreshTimer);
}
function OnScrollGen() {
	divM=document.getElementById("divMenu")
	divM.style.top = document.body.scrollTop+stmnBASE;
	RefreshStaticMenu();
}
function OnScrollGenMain() {
	stmnGAP1 = 230;
	stmnBASE = 230;
	divM=document.getElementById("divMenu")
	divM.style.top = document.body.scrollTop+stmnBASE;
	RefreshStaticMenu();
}

/*************************************************************************
* New Flash (Navigation+Visual) Publish			2010-02-18
*************************************************************************/
function swfprint(furl,fwidth,fheight,transoption,fname)	{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ fwidth +'" height="' + fheight +'" name="'+ fname +'" id="'+ fname +'" align="middle">');
	document.write('<param name="movie" value="'+ furl +'"/>');
	if (transoption == "t")	{
		document.write('<param name="wmode" value="transparent"/>');
	} else if	(transoption == "o")	{
		document.write('<param name="wmode" value="opaque"/>');
	}
	document.write('<!-- Hixie method -->');
	document.write('<!--[if !IE]> <-->');
	document.write('<object type="application/x-shockwave-flash" data="'+ furl +'" width="'+ fwidth +'" height="' + fheight +'" name="'+ fname +'" id="'+ fname +'"');
	if (transoption == "t")	{
		document.write(' wmode="transparent"');
	} else if	(transoption == "o")	{
		document.write(' wmode="opaque"');
	}
	document.write('></object>');
	document.write('<!--> <![endif]-->');
	document.write('</object>');
}



