<!-- Opening new window -->
 
function openWindow( url, wName, wWidth, wHeight ) {
//	alert(url+' '+wName+' '+wWidth+' '+wHeight);
	if( url.indexOf('%5F') == 0 ){
		url = unescape(url);
	}
	if( url.indexOf('_') == 0 ){
		url = url.substring(1);
	}
	var ind = window.document.location.href.lastIndexOf("/");
	var prefixUrl = window.document.location.href.substring(0, ind+1);
	if( url.indexOf("http") != 0 ){
		url = prefixUrl + url;
	}
	//alert(url);
	wWidth = parseInt(wWidth);
	wHeight = parseInt(wHeight);
	var wWidthW = Math.min(self.screen.availWidth - 15, wWidth );
	var wHeightW = Math.min(self.screen.availHeight - 25, wHeight );
	var scrollIt = (wWidth==wWidthW && wHeightW==wHeight )? 'no' : 'yes';
	if( scrollIt == 'yes' && (wWidth==wWidthW) ){
		wWidthW = Math.min(self.screen.availWidth , wWidthW + 20 );
	}
//alert("O:"+url+' '+wName);
	//alert(wWidth+' '+wHeight+' '+wWidthW+' '+wHeightW+':'+self.screen.availWidth+' '+self.screen.availHeight);
	if(navigator.appName == 'Microsoft Internet Explorer') {
    	window.open(url, wName,'top=0,left=0,width='+wWidthW+',height='+wHeightW+',scrollbars='+scrollIt+',toolbar=no,menubar=0,location=no,status=no');
	 } else {
	    if( navigator.appVersion.indexOf("Safari") != -1){
			wWidthW -= 2;
	    }
		window.open(url, wName,'top=0,left=0,width='+wWidthW+',height='+wHeightW+',scrollbars='+scrollIt+',toolbar=no,menubar=0,location=no,status=no');
	}     
}
