<!--
//#########################################################################################
function ImagePreload() { //v3.0
  var d=document; if(d.images){ if(!d.IP_a) d.IP_a=new Array();
    var i,j=d.IP_a.length,a=ImagePreload.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.IP_a[j]=new Image; d.IP_a[j++].src=a[i];}}
}
//#########################################################################################
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth();
curr_month++;
var curr_year = d.getFullYear()
//#########################################################################################
function StopCSS(myForm) {
  var fieldItem;
  for (i=0;i<myForm.length;i++) {
    fieldItem = myForm.elements[i];
    fieldItem.value.replace(/\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-/g,"");
  }
}
//#########################################################################################
function textCounter(field, maxlimit) {
CurrFunc = "textCounter("+field+","+maxlimit+")";
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
}
// #########################################################################################
function imgOn(imgName)   {if (document.images) {document[imgName].src = eval(imgName + "on.src");}}
//##########################################################################################
function imgOff(imgName)  {if (document.images) {document[imgName].src = eval(imgName + "off.src");}}
// #########################################################################################
function ValidateEmail(formItem) {
  if(formItem.value.match("Required field")) return false;
  if (formItem.value.length==0){ return true;}
    var strng=formItem.value; var emailFilter=/^.+@.+\..{2,3}$/; var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
    if (!(emailFilter.test(strng))) { formItem.value="Invalid address"; return false;  }
    else if (strng.match(illegalChars)) { formItem.value="Invalid address"; return false;
  }
}
// #########################################################################################
function ValidateContactForm(form){
  var retnval = true;
  if(form.fname.value=='' || form.fname.value=='First Name Required')
    {
    form.fname.style.color='#CE0000'
    form.fname.value='First Name Required'; retnval = false; }
  if(form.lname.value=='' || form.lname.value=='Last Name Required')
    {
    form.lname.style.color='#CE0000'
    form.lname.value='Last Name Required';  retnval = false; }
  if(form.email.value=='' || form.email.value=='Email Required')
    {
    form.email.style.color='#CE0000'
    form.email.value='Email Required'; retnval = false; }    
  retnval = ValidateEmail(form.email);
  return retnval;
}

// ORIG: Maryanna Nesina - http://www.bio.pu.ru/~mar
// MODIFIED: Eric Bonito -  http://www.netcougar.com
function domG_Element(xx) 
{
  // This function returns document's elemtnt acording it's name
  // Using Document Object Model
 if (document.getElementById) return document.getElementById(xx); 
 return nul;
}
// #########################################################################################
function showImg(name,count) 
{
// This is the main function that hide all the layers but the only one, 
// which name was delivered to the function as a parametr
var ii;  // cicle variable
if (count > 2) {
var m=2;
}
else{
var m=count; // variable that shows maximum nomber in layers' names 
}
var m=count; // variable that shows maximum nomber in layers' names 
var qq;  // here we store the name of a layer that we must show
var nen; // here we store the names of all layers (in a cicle)

NeMenu =  new Array(m+1); // an array to store the objects -  all the layers that should be hidden
nename = new Array(m+1);  // an array to store the names of all the layers  that should be hidden
// cicle to store the names of all the layers that should be hidden an array
for (ii=0; ii<=m; ii++) {
  nen="Img" + ii;
  nename[ii]=nen;
   if (name) { // this
    if (nen==name) qq=ii; // flag on - if it's a name of a layer that should be shown
   }
}
// than we should show one layer and hide all the others (in a cicle) 
// Do it for all the main browsers types
  if (document.getElementById) { 
  // Type 1: IE5,6; NN6; Mozilla
  // if our brouser supports DOM and we can get an object according to it's name
    if (name) { // if there was a parametr
     var Img = domG_Element(name); // get an object 
     Img.style.visibility='visible'; // and show it, changing the style
    }
    for (ii=0; ii<=m; ii++) { // for all the layers
     if (ii!=qq) { // but one that should be shown
      NeMenu[ii] = domG_Element(nename[ii]); // get an object that we do NOT show
      NeMenu[ii].style.visibility='hidden';  // and hide it, changing the style
     }
    }
    return true; // exit function
  } // that's all for the first type of browsers
 if(document.all) { 
  // Type 2: For document.all stands IE4-6 and Opera5, but IE5,6 were gone as the 1-st type 
   if (name) document.all[name].style.visibility= 'visible'; 
   //if there was a parametr, show that layer using style
  for (ii=0; ii<=m; ii++) { 
   // hide all the layers but one that should be shown  - using style
   if (ii!=qq) document.all[nename[ii]].style.visibility= 'hidden'; 
  }
    return true; // exit function
 } // that's all for the second type of browsers

 if (document.layers) { 
   //Type 2: NN4
   if (name) document.layers[name].visibility='show'; // if there was a parametr, show that layer using layer
    for (ii=0; ii<=m; ii++) {
    // hide all the layers but one that should be shown  - using layer
     if (ii!=qq) document.layers[nename[ii]].visibility='hide';
    }
    return true; // exit function
  } // that's all for the second type of brousers (NN4)
}
// #########################################################################################

// #########################################################################################
-->