   var win= null;
   function NewWindow(mypage,myname,w,h,scroll)
   {
	 	 var winl = (screen.width-w)/2;
     var wint = (screen.height-h)/2;
     var settings  ='height='+h+',';
     settings +='width='+w+',';
     settings +='top='+wint+',';
     settings +='left='+winl+',';
     settings +='scrollbars='+scroll+',';
     settings +='resizable=yes';
     win=window.open(mypage,myname,settings);
   	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
   }

   function screenpopup(imgurl, imgwidth, imgheight)
   {
   	 var maxwidth = screen.availWidth - 20;
		 var maxheight = screen.availHeight - 40;
	   var width = parseInt(imgwidth) + 40;
	   var height = parseInt(imgheight) + 40;
	   var scrollbars = 0;
	   if (width > maxwidth)
	   {
		   width = maxwidth;
		   scrollbars = 1;
	   }
	   if (height > maxheight)
	   {
		   height = maxheight;
		   scrollbars = 1;
	   }
	   props = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scrollbars+',resizable=1,width='+width+',height='+height;
	   window.open(imgurl, '', props);
   }

	function referTo(uri)
	{
		window.open(uri);
	}

