// Give the function a name so the onSubmit event for the submit 
// button can call it. 

function ShowPic(sImage)
{
   document.gallery.src = sImage;
}

function FullYear () 
{              
	var ddate = new Date()                          
	return ((ddate.getMonth() + 1) + "/" + ddate.getDate() + "/" + ddate.getYear()) 
} 

function BrowserDate () 
{ 
	var ddate= new Date();            
    var year=ddate.getYear()            
    if (year < 100) {year = (year + 1900)}             
    return ((ddate.getMonth() + 1)+ "/" + ddate.getDate()+ "/" + year); 
} 


// Ad 180 x 150 pixels
function ShowAd_180x150Rt () 
{
		pics = new Array("ad_dash_a01.gif", 
                 "ad_dash_a02b.gif", 
                 "ad_dash_a03b.gif"); 
		lnks = new Array("http://www.microsoft.com", 
                 "http://www.google.com", 
                 "http://www.cnn.com"); 
		curDate = new Date(); 
		curTim = curDate.getTime(); 
		picNum = curTim % pics.length; 
		document.write("<a href='" + lnks[picNum] + 
               "'><img src='http://exceluser.com/aff/images/"  + pics[picNum] + 
               "' border='0' width='180' height='150' align='right'></a>");
}

function navBar1 ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#9FACAA';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#C5D6D1';

		}
	}
}

function navBar1A ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#EED7B4';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#C5D6D1';

		}
	}
}

function navBar2 ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#9DABC4';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#5F79A3';

		}
	}
}

function navBar3 ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#000066';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#5F79A3';

		}
	}
}

function catBar1 ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#FBF4E8';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#FBF4E8';

		}
	}
}

function catBar1A ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#FBF4E8';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#FBF4E8';

		}
	}
}



function priceBtn1 ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#F5D7A6';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#F5D7A6';

		}
	}
}

function priceBtn1A ( tableCellRef, menFlag, navStyle ) {
	if ( menFlag ) {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#B5E8B8';

		}
	} else {
		switch ( navStyle ) {
			case 1:
				tableCellRef.style.backgroundColor = '#F5D7A6';

		}
	}
}





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 XfrmValidate() {
 var str=document.collectdata.Contact_Email.value
 var filter=/^.+@.+\..{2,3}$/
 var status;
    if ( document.collectdata.FirstName.value.length == 0 ) {
 alert("Your first name is required.");
 status = false;
 document.collectdata.FirstName.focus(); 
 }
	 else if ( document.collectdata.LastName.value.length == 0 ) {
 alert("Your last name is required.");
 status = false;
 document.collectdata.LastName.focus(); 
 } 
    else if ( document.collectdata.EmailAddr.value.length == 0 ) {
 alert("Your email address is required.");
 status = false;
 document.collectdata.EmailAddr.focus();
 }
    else if ( filter.test(str) ) {
    status = true;
    }
    else {
 alert("Email address format is not correct.");
 status = false;
 document.collectdata.EmailAddr.focus();
 } return (status);
}


function frmValidate() {
 {
 alert("Your first name is required.");
 status = false;
 document.collectdata.FirstName.focus(); 
 } return (status);
}

function openWindow(url, w, h) {
        var options = "width=" + w + ",height=" + h + ",";
        options += "resizable=yes,scrollbars=yes,status=yes,";
        options += "menubar=no,toolbar=no,location=no,directories=no";
        var newWin = window.open(url, 'newWin', options);
        newWin.focus();
      }

function openWindow2(url, w, h) {
        var options = "width=" + w + ",height=" + h + ",";
        options += "resizable=yes,scrollbars=yes,status=yes,";
        options += "menubar=no,toolbar=no,location=yes,directories=no";
        var newWin = window.open(url, 'newWin', options);
        newWin.focus();
      }
