var win;
var bisOpera=isOpera();
function isOpera()
{
	return navigator.appName.indexOf("Microsoft") != -1 &&  navigator.userAgent.toLowerCase().indexOf("opera")!=-1;
}

// ------- first script 

function OpenWindow(url,scrol,w,h,tool,loc,stat,menu,resiz,full){
	posLeft = ( screen.width / 2) - ( w / 2 );
	posTop = ( screen.height / 2 ) -  ( h / 2 );
	windowprops = "top=" + posTop + ", left=" + posLeft+", width=" + w + ", height=" + h + ", scrollbars=" + scrol + ", toolbar=" + tool + ", location =" + loc + ", status =" + stat + ", menubar =" + menu + ", resizable =" + resiz + ", fullscreen =" + full ;
	if(bisOpera){
		win = window.open("", "popupPage", windowprops);
 		win.location = url;
	}
	else
	{
		win = window.open(url, "popupPage", windowprops);
	 }
	win.focus();
	return false;
}

// ------- second lowercase script for XHTML 1.0

function openwindow(url,scrol,w,h,tool,loc,stat,menu,resiz,full){
	posLeft = ( screen.width / 2) - ( w / 2 );
	posTop = ( screen.height / 2 ) -  ( h / 2 );
	windowprops = "top=" + posTop + ", left=" + posLeft+", width=" + w + ", height=" + h + ", scrollbars=" + scrol + ", toolbar=" + tool + ", location =" + loc + ", status =" + stat + ", menubar =" + menu + ", resizable =" + resiz + ", fullscreen =" + full ;
	if(bisOpera){
		win = window.open("", "popupPage", windowprops);
 		win.location = url;
	}
	else
	{
		win = window.open(url, "popupPage", windowprops);
	 }
	win.focus();
	return false;
}

// ------- percent map popup

function percent(url,scrol,w,h,percent,tool,loc,stat,menu,resiz,full){
		 if (window.screen) {
        w = window.screen.availWidth * percent / 100;
        h = window.screen.availHeight * percent / 110;
    }
	posLeft = ( screen.width / 2) - ( w / 2 );
	posTop = ( screen.height / 2 ) -  ( h / 2 );
	windowprops = "top=" + posTop + ", left=" + posLeft+", width=" + w + ", height=" + h + ", scrollbars=" + scrol + ", toolbar=" + tool + ", location =" + loc + ", status =" + stat + ", menubar =" + menu + ", resizable =" + resiz + ", fullscreen =" + full ;
		if(bisOpera)
			{ win = window.open("", "MapPopupPage", windowprops);
 			win.location = url;
		}	else 	{
			win = window.open(url, "MapPopupPage", windowprops);	}
			win.focus(); return false; }