var arrPopup = new Array;
var nPopup = 0;
var tmpWith = 0;

function p_windowclose(pID, bSetCookie, strURL) {
 	var iDiv;

	//´õÀÌ»ó¿­Áö¾Ê±â
	if (bSetCookie == "1"){	
		SetCookie(pID, "1");
	} 
	//ÇÏ·çµ¿¾È¿­Áö¾Ê±â
	else if(bSetCookie == "2")
	{ 
		SetCookie(pID, "2");
	}	
	
	for( i=0 ; i < nPopup; i++){
		if(pID  == arrPopup[i]){		    
			iDiv = arrPopup[i];
			break;
		}			
	}

	
	document.all[pID].style.display="none";
	
	if (strURL != "") document.location.href = strURL;
}
		
function p_windowopen(pID, pPopSrc, pWidth, pHeight){
	var pTop, pLeft;
	pTop = posPopup.offsetTop + 125; //topÀ§Ä¡
//	pLeft = popLeft.offsetLeft /2; //leftÀ§Ä¡
	pLeft = document.body.scrollWidth / 2 - 980 / 2;
	arrPopup[nPopup] = pID;
	
	if ( nPopup != 0 ){		
		pLeft = tmpWith+12;	
	}
	
	tmpWith = tmpWith + pWidth;
	nPopup = nPopup + 1;
	
	strPopupScript = "<div id='" + pID + "' onclick='javascript:alert(\"d\")' style='border-width:0px;POSITION: absolute;TOP: " + pTop + "px; LEFT: " + pLeft + "px;z-index:199'>\<IFRAME src='" + pPopSrc + "' frameBorder=0 scrolling=no width=" + pWidth + " height=" + pHeight + "></IFRAME>\</div>";
	
	document.writeln(strPopupScript); 
}

function windowOpen(pID, pPopSrc, pWidth, pHeight){
    var pTop, pLeft;
    
	pTop = 160;
    pLeft = (window.screen.height) - (100+pWidth);
	    
    var win_property = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left="+pLeft+",top="+pTop+",width="+pWidth+",height="+pHeight;
    
    window.open(pPopSrc, pID, win_property); 
}


