var lstOpenedPopup = new Array();

function openPopup(pu, sn, iw, ih, il, it, im, i2, ito, ist, ir, ilo) {
var a1;
a1='width='+iw+',height='+ih;
a1+=',left='+ il +',top='+ it +',directories=0,hotkeys=1';
a1+=',menubar='+im +',scrollbars='+i2+',toolbar='+ito+',status='+ist;
a1+=',resizable='+ir+',location='+ilo;
lstOpenedPopup[sn] = window.open(pu, sn, a1);

return;
}

function closeAllOpenedPopup () {
	
	for(popupName in lstOpenedPopup) {
		if(lstOpenedPopup[popupName]) {
			//lstOpenedPopup[popupName].close();
		}
	}
}
function resizeMe() {
	
	navigateur = navigator.userAgent;
	 if (navigateur.indexOf("MSIE")>-1) {
		scrollVisible = document.body.scroll != 'no';
	 } else {
	 	scrollVisible = window.scrollbars.visible;
	 }

	
	if( !scrollVisible && document.getElementById('scrollable_popup')) {
		if (self.innerWidth) {
			frameWidth  = self.innerWidth;
			frameHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientWidth) {
			frameWidth  = document.documentElement.clientWidth;
			frameHeight = document.documentElement.clientHeight;
		} else if (document.body) {
			frameWidth  = document.body.clientWidth;
			frameHeight = document.body.clientHeight;
		}
		
		with(document.getElementById('scrollable_popup')) {
			style.height = 	frameHeight+'px';
			style.width  = 	frameWidth+'px';
			style.overflow ='auto';
		}
	}
}