function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//function setClass()
//{
// alert('begin');
// //determine browser type and if IE, set the class
//    var agt=navigator.userAgent.toLowerCase();
//    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
// if (is_ie) {
//
//    var obj= document.getElementById(leftcol);
//    alert(obj);
//    obj.class = "menubg";
//
//    //document.all.leftcol.style.class="menubg";
//  }
//}


function detailedMapWindow(url) {

	options = "left=0,top=0,toolbar=1,status=1,menubar=1,scrollbars=1,resizable=1,location=1";
	anotherWindow = window.open('','',options);
	anotherWindow.document.close();
}

function pop(url, dat_width, dat_height) {
	myhtml = '<html><head><title>Enlarged Image</title>';
	
	myhtml = myhtml + '<link rel="stylesheet" href="cats.css" type="text/css"/><body bgcolor="#339966" topmargin="0" leftmargin="0"></head>';
	myhtml = myhtml + '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td>';
	myhtml = myhtml + '<img src="' + url + '" border="0">';
	myhtml = myhtml + '</td></tr></table>';
	myhtml = myhtml + '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
	myhtml = myhtml + '<tr><td colspan="2" height="5">';
	myhtml = myhtml + '<img src="site_images/spacer.gif" height="5"/>';
	myhtml = myhtml + '</td></tr><tr><td width="10">';
	myhtml = myhtml + '<img src="site_images/spacer.gif" width="10"/></td>';
	//myhtml = myhtml + '<td><a href="#" title="Detailed map" onClick="detailedMapWindow();">>>detailed map</a></td>';
	myhtml = myhtml + '<td class="date"><a href="#" title="close" onClick="window.close();">>>close window</a>';
	myhtml = myhtml + '</td></tr></table>';
	myhtml = myhtml + '</p></body></html>';

	options = "left=0,top=0,toolbar=0,status=1,menubar=0,scrollbars=0,resizable=0,width=" + dat_width + ",height=" + dat_height;

	mywindow = window.open('','',options);
	mywindow.document.writeln(myhtml);
	mywindow.document.close();
}

function pop2(url, dat_width, dat_height) {
	//myhtml = '<html><head><title>Map</title>';


	options = "left=0,top=0,toolbar=1,status=1,menubar=1,scrollbars=1,resizable=1,location=1,width=" + dat_width + ",height=" + dat_height;

	mywindow = window.open(url,'',options);
	
	//mywindow.document.close();
}



function popcentre(url,name,width,height) {
   var titleBarHeight, windowBorderWidth
   titleBarHeight = 24
   windowBorderWidth = 4

   var screenWidth, screenHeight
   screenWidth = 800
   screenHeight = 600

   if (window.screen) {

      if (window.screen.availWidth) {
      
         // ok browser has the appropriate properties we need to centre it
         screenWidth = window.screen.availWidth
         screenHeight = window.screen.availHeight
   alert(screenWidth);
   alert(screenHeight);
         
      }
   }

   var windowWidth = windowBorderWidth + width + windowBorderWidth
   var windowHeight = titleBarHeight + height + windowBorderWidth

   var left = (screenWidth - windowWidth) / 2
   var top = (screenHeight - windowHeight) / 2

   var myoptions = 'left=0,top=0,screenX=0,screenY=0,width='+width+',height='+height+',scrollbars=yes,resizable=1,toolbar=yes,location=1,directories=1,status=1,menubar=1,copyhistory=1';
   
   alert(url+name+myoptions);
   window.open(url,name,myoptions);
}


function validateEmail(theForm,theField)
      {
        var regex=/^\w+((\.|-|,|'|&)\w+)*@\w+(-\w+)*(\.\w+(-\w+)*)+$/;

        var ok=regex.exec(theField.value);
        if (!ok)
        {
          alert("Please enter a valid e-mail address (e.g. you@yourdomain.com).");
          return false;
        }
        window.open("http://registration.virtualspectator.com/cgi-bin/ac2003/roi/clone.cgi?Email="+theField.value,"Confirm","resizable,height=160,width=400");
        return true;
      }




