window.onerror=SuppressError
function SuppressError()
{
	return false;
	
}
function expand(sec)
{
     thisSec = eval('e' + sec);
     if (thisSec != null){
          if (thisSec.length){
               if (thisSec[0].style.display != 'none'){
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'none'}
               }
               else{
                    for (var i=0;i<thisSec.length;i++) {thisSec[i].style.display = 'inline'}
               }
          }
          else{
                         if (thisSec.style.display != 'none')     {thisSec.style.display = 'none'}
               else{thisSec.style.display = 'inline'
               					for (var i=0;i<21;i++) {
               						thisSec2 = eval('e' + i);
               						if(thisSec != thisSec2){
               							
               							thisSec2.style.display = 'none'
               							//alert(thisSec2);
               						}
               						//else{alert('thisSec2');}

								}
               
               }
          }
     }
}

function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function FormValidator(theForm)
{
  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }

  if (theForm.subject.value == "")
  {
    alert("Please enter a value for the \"Subject\" field.");
    theForm.subject.focus();
    return (false);
  }
  
  if (theForm.phone.value.length < 10)
  {
    alert("Please enter your \"Phone no\" .");
    theForm.phone.focus();
    return (false);
  }
  
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  
  if (theForm.comments.value == "")
  {
    alert("Please enter a value for the \"Comments\" field.");
    theForm.comments.focus();
    return (false);
  }
  return (true);
}


function FormValidator_IndexPage(theForm)
{ 
  if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.name.focus();
    return (false);
  }
  
  if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  
  if (theForm.comments.value == "")
  {
    alert("Please enter a value for the \"Comments\" field.");
    theForm.comments.focus();
    return (false);
  }
  return (true);
}
function popUpWindow(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=700,'
popwin=window.open(URL,'',look)
}
function popUpWindowSmall(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=200,'
popwin=window.open(URL,'',look)
}
function popUpWindowPDF(URL) {
var look='toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=950,height=800,'
popwin=window.open(URL,'',look)
}

//<!--No right Mouse Click-->
function noRightClick(){
	if (event.button==2){
	alert('You may not right mouse click on this page.')
	}
}
document.onmousedown=noRightClick

