<!--

function popup(PopURL, PopName) { 
var newwin = window.open( PopURL, PopName, "toolbar=1,location=1,scrollbars=1,directories=1,resizable=1,width=640,height=400"); 
if(navigator.appName=="Netscape") newwin.focus(); 
} 


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_validateForm() { //v2.0
//------ Customize this string if needed ------
var RefString="1234567890-()+.";
//---------------------------------------------
  var i,objStr,field,theCheck,atPos,theNum,colonPos,min,max,errors='';
  for (i=0; i<(MM_validateForm.arguments.length-2); i+=3) {
    objStr = MM_validateForm.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.substring(0,objStr.lastIndexOf('.')).
                 lastIndexOf('.'),objStr.length);  //fix layer ref if not supp
    field = eval(objStr);
    field.name = (field.name)?field.name:objStr;
    theCheck = MM_validateForm.arguments[i+2];
    if (field.value) { //IF NOT EMPTY FIELD
      if (theCheck.indexOf('isEmail') != -1) { //CHECK EMAIL
        atPos = field.value.indexOf('@');
        if (atPos < 1 || atPos == (field.value.length - 1))
          errors += '- '+field.name+' must contain an e-mail address.\n';
      } else if (theCheck != 'R') { //START NUM CHECKS
	thisNum=field.value;
	
	for (Count=0; Count < thisNum.length; Count++)  {
           TempChar= thisNum.substring (Count, Count+1);
           if (RefString.indexOf (TempChar, 0)==-1) { 
                theNum = '' ;}
	   else {
		theNum = thisNum;
	   }
        }
	if (field.value != ''+theNum) errors += '- '+field.name+' must contain a number.\n';
	theNum = parseFloat(field.value);
	if (theCheck.indexOf('inRange') != -1) { //CHECK RANGE
          colonPos = theCheck.indexOf(':');
          min = theCheck.substring(8,colonPos);
          max = theCheck.substring(colonPos+1,theCheck.length);
          if (theNum < min || max < theNum || field.value != ''+theNum) //bad range
            errors += '- '+field.name+' must contain a number between '+min+' and '+max+'.\n';
    } } }
    else if (theCheck.charAt(0) == 'R') errors += '- '+field.name+' is required.\n';
  }
  if (errors) alert('The following error(s) occurred:\n'+
                    errors);
  document.MM_returnValue = (errors == '')
}



function CountClicks(URL) {

   window.open(URL,'new','toolbar=1,menubar=yes,location=1,scrollbars=1,resizable=1,status=1'); 
   

    //if (document.all)
        var xMax = screen.width, yMax = screen.height;
    //else
        //if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        //else
         //  var xMax = 640, yMax=480;

   // var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;

    //window.open(URL,'new','screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+''); 
    
}

//-->