
/////JavaScript used to select date on monthlyreport.asp/////
/////Lines 4 - 76/////
function day_check(field)
{
if (field.value != "")
{
 var val = parseInt(field.value);
 var newval = ""+val;  
  if (newval != field.value) 
  {
    alert("You must give numeric value for the day!");
    field.focus();
    field.select();
   }
  else
  {
   if ((val <=0) || (val >= 32))
   {
    alert("Day " + val + " never exsists in a month!");
    field.focus();
    field.select();
   }
  }
}
}

function year_check(field)
{
if (field.value != "")
{
 var val = parseInt(field.value);
 var newval = ""+val;  
  if (newval != field.value) 
  {
    alert("You must give numeric value for the year!");
    field.focus();
    field.select();
   }
  else
  {
   if (val <=0)
   {
    alert("Year cannot be less than 0");
    field.focus();
    field.select();
   }
  }
}
}

function check(form)
{
 if (form.day.value == "")
 {
   alert("Please fill in a day!");
   form.day.focus();
   return false;
 }
  if (form.year.value == "")
 {
   alert("Please fill in a year!");
   form.day.focus();
   return false;
 }
  var var_date = new Date(form.year.value,form.month.value,form.day.value); 
  if (var_date.getDate() != form.day.value)
  {
    alert("The month "+ form.month.options[form.month.selectedIndex].text +" has no " + form.day.value +"th day");
    return false
  } 
  
 return true;
}

/////End of JavaScript used to select date on monthlyreport.asp/////

document.imgs = new Array();
	loadimages("about_us", "images/about_us.gif", "images/about_us_o.gif");
	loadimages("contact_us", "images/contact_us.gif", "images/contact_us_o.gif");
	loadimages("products_services", "images/products_services.gif", "images/products_services_o.gif");
	loadimages("fx_studio", "images/fx_studio.gif", "images/fx_studio_o.gif");
	loadimages("login", "images/login.gif", "images/login_o.gif");
	loadimages("testimonials", "images/testimonials.gif", "images/testimonials_o.gif");
	loadimages("request_quote", "images/request_quote.gif", "images/request_quote_o.gif");
	loadimages("links", "images/links.gif", "images/links_o.gif");

function loadimages(imgname, on, off){
	document.imgs[imgname] = new Image;
	document.imgs[imgname].src = on;
	document.imgs[imgname+"_o"] = new Image;
	document.imgs[imgname+"_o"].src = off;
}

function over(imgname){
	document.images[imgname].src = document.imgs[imgname].src;
}


function out(imgname){
	document.images[imgname].src = document.imgs[imgname+"_o"].src;
}

