// JavaScript Document

window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var menuActive = 0;
var menuOn = 0;
var onLayer;
var timeOn = null;

function showLayer(layerName,aa){
var x =document.getElementById(aa);
var tt =findPosX(x);
var ww =findPosY(x)+20;

if (timeOn != null) {
clearTimeout(timeOn);
hideLayer(onLayer);
}
if (IE4) {
var layers = eval('document.all["'+layerName+'"].style');
layers.left = tt;
eval('document.all["'+layerName+'"].style.visibility="visible"');
}
else {
if(document.getElementById){
var elementRef = document.getElementById(layerName);
if((elementRef.style)&& (elementRef.style.visibility!=null)){
elementRef.style.visibility = 'visible';
elementRef.style.left = tt;
elementRef.style.top = ww;
}
}
}
onLayer = layerName
}

function hideLayer(layerName){
if (menuActive == 0)
{
if (IE4){
eval('document.all["'+layerName+'"].style.visibility="hidden"');
}
else{
if(document.getElementById){
var elementRef = document.getElementById(layerName);
if((elementRef.style)&& (elementRef.style.visibility!=null)){
elementRef.style.visibility = 'hidden';
}
}
}
}
}

function btnTimer() {
timeOn = setTimeout("btnOut()",600)
}

function btnOut(layerName){
if (menuActive == 0){
hideLayer(onLayer)
}
}

var item;
function menuOver(itemName,ocolor){
item=itemName;
itemName.style.backgroundColor = ocolor; //background color change on mouse over
clearTimeout(timeOn);
menuActive = 1
}

function menuOut(itemName,ocolor){
if(item)
itemName.style.backgroundColor = ocolor;
menuActive = 0
timeOn = setTimeout("hideLayer(onLayer)", 100)
}

function findPosX(obj)
{
var curleft = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x)
curleft += obj.x;
return curleft;
}

function findPosY(obj)
{
var curtop = 0;
if (obj.offsetParent)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y)
curtop += obj.y;
return curtop;
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=%22%27%2BimageName%2B%27/%22><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=%22%27%2BimageName%2B%27/%22 width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function Lvl_openWin(u,n,w,h,l,t,c,f) { //v2.2 4LevelWebs
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
	f+=',top='+t+',left='+l;LvlWin=window.open(u,n,f);LvlWin.focus();
}

function goVisitSite(Site){
NewWindow1 =window.open(Site, "viewwin","toolbar=0,width=650,height=450,scrollbars=no,resizable=no");
}






function Validate(theForm)
{

if (theForm.FNAME.value == "")
{
  alert("Please enter your first name.");
  theForm.FNAME.focus();
  return (false);
}

if (theForm.FNAME.value.length  > 30)
{
  alert("You have entered too many characters in the First Name field.  If you have a very long first name, please abbreviate it.");
  theForm.FNAME.focus();
  return (false);
}








var eMailAddress = theForm.EMAIL.value;
var eMailAddressSearchForAtSign = eMailAddress.indexOf("@");
var eMailAddressSearchWhiteSpaces = eMailAddress.search(" ");
var eMailAddressSearchForValidExtension1 = eMailAddress.indexOf(".com");
var eMailAddressSearchForValidExtension2 = eMailAddress.indexOf(".edu");
var eMailAddressSearchForValidExtension3 = eMailAddress.indexOf(".net");
var eMailAddressSearchForValidExtension4 = eMailAddress.indexOf(".tv");
var eMailAddressSearchForValidExtension5 = eMailAddress.indexOf(".us");
var eMailAddressSearchForValidExtension6 = eMailAddress.indexOf(".gov");
var eMailAddressSearchForValidExtension7 = eMailAddress.indexOf(".org");
var eMailAddressSearchForValidExtension8 = eMailAddress.indexOf(".ca");
var eMailAddressSearchForValidExtension9 = eMailAddress.indexOf(".biz");
var eMailAddressSearchForValidExtension10 = eMailAddress.indexOf(".info");
var eMailAddressSearchForValidExtension11 = eMailAddress.indexOf(".us");
var eMailAddressSearchForValidExtension12 = eMailAddress.indexOf(".uk");
var eMailAddressSearchForValidExtension13 = eMailAddress.indexOf(".jp");
var eMailAddressSearchForValidExtension14 = eMailAddress.indexOf(".cc");
var eMailAddressSearchForValidExtension15 = eMailAddress.indexOf(".aw");
var eMailAddressSearchForValidExtension16 = eMailAddress.indexOf(".es");
var eMailAddressSearchForValidExtension17 = eMailAddress.indexOf(".pf");
var eMailAddressSearchForValidExtension18 = eMailAddress.indexOf(".za");
var eMailAddressSearchForValidExtension19 = eMailAddress.indexOf(".mil");

if (eMailAddress == "")
{
 alert("Please enter a value your for your E-Mail Address.");
 theForm.EMAIL.focus();
 return (false);
}
if (eMailAddress.length < 5)
{
 alert("Please enter at least 5 characters in the E-Mail Address.");
 theForm.EMAIL.focus();
 return (false);
}

if (eMailAddress.length > 40)
{
 alert("You have entered too many characters or more than one E-Mail Address. Please make the appropriate corrections.");
 theForm.EMAIL.focus();
 return (false);
}



if (eMailAddressSearchForAtSign  < 1)
{
	alert("You did not enter a \" @ \" in your e-mail address. If you are an AOL member, please enter your screenname with the \" @aol.com \" extension.");
	theForm.EMAIL.focus();
	return(false);
}

if ((eMailAddressSearchForValidExtension1 < 1) && (eMailAddressSearchForValidExtension2 < 1) && (eMailAddressSearchForValidExtension3 < 1) && (eMailAddressSearchForValidExtension4 < 1) && (eMailAddressSearchForValidExtension5 < 1) && (eMailAddressSearchForValidExtension6 < 1) && (eMailAddressSearchForValidExtension7 < 1) && (eMailAddressSearchForValidExtension8 < 1) && (eMailAddressSearchForValidExtension9 < 1)  && (eMailAddressSearchForValidExtension10 < 1) && (eMailAddressSearchForValidExtension11 < 1) && (eMailAddressSearchForValidExtension12 < 1) && (eMailAddressSearchForValidExtension13 < 1) && (eMailAddressSearchForValidExtension14 < 1) && (eMailAddressSearchForValidExtension15 < 1) && (eMailAddressSearchForValidExtension16 < 1) && (eMailAddressSearchForValidExtension17 < 1) && (eMailAddressSearchForValidExtension18 < 1) && (eMailAddressSearchForValidExtension19 < 1))
{
	alert("You did not enter a valid extension for your e-mail address. If you are an AOL member, please enter your screenname with the \" @aol.com\" extension.");
	theForm.EMAIL.focus();
	return(false);
}

if (eMailAddressSearchWhiteSpaces  > -1)
{
	alert("Spaces are not allowed in a valid e-mail address. Please remove all SPACES winthin your e-mail address");
	theForm.EMAIL.focus();
	return(false);
}


if (theForm.PHONE.value == "")
{
  alert("Please enter a phone number where we can reach you.");
  theForm.PASSWORD.focus();
  return (false);
}


if (theForm.COMMENTS.value == "")
{
  alert("Please fill in the comments/question.");
  theForm.COMMENTS.focus();
  return (false);
}



}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
