var dropdowns=new Array()

var myform
var DIV1
var DIV2
var ON
var OFF
var TOP="top="
var LEFT="left="
var netscape4
var explorer4
var isMac
var mySwitch=false
var counter=0
var temp


isMac=navigator.appVersion
isMac=isMac.toLowerCase()
isMac=isMac.indexOf("macintosh")
if((isMac>-1)&&(navigator.appName=="Microsoft Internet Explorer")){isMac=true}
else{isMac=false}


if(document.layers){
	DIV1="document.layers['";
	DIV2="'].";
	ON="visibility='show'";
	OFF="visibility='hide'";
	netscape4=true;
	}
else if(document.all){
	DIV1="document.all['";
	DIV2="'].style.";
	ON="visibility='visible'";
	OFF="visibility='hidden'";
	explorer4=true;
	}
else if(document.getElementById){
	DIV1="document.getElementById('";
	DIV2="').style.";
	ON="visibility='visible'";
	OFF="visibility='hidden'";
	}










var formBytes=new Array()

///open window function
var isClicked=0
var newWindow=null
function openWindow(swap1,swap2)
{
if((isClicked>0)&&(newWindow.closed==false))
        {
        newWindow.close();
        }
newWindow=window.open(swap1,'',swap2);
isClicked++
}
function closeWindow()
{
if(newWindow)
        {
        newWindow.close()
        }
}
////////////

//FORM VALIDATION///////////////////////////////////////////////////////////////////////////////////////

// "t-" = TEXTBOX OR TEXTAREA
// "s-" = SELECT BOX (DROP-DOWN MENU)
// "r-" = RADIO BUTTONS
// "n-" = NUMBER in TEXTBOX
// "#"  = NUMBER WITH SPECIFIC LENGTH   example name : #-9socnum
// "e-" = EMAIL

var validateCounter
var myElement

function validate(swap){
myform=swap
mySwitch=false
counter=0
formTemp=""



for(validateCounter=0;validateCounter<myform.length;validateCounter++){
	if(myform.elements[validateCounter].name.charAt(1)=="-"){
    	myElement=myform.elements[validateCounter].name
        if(myElement.charAt(0)=="t"){emptyField()}
        else if(myElement.charAt(0)=="s"){validateSelect()}
        else if(myElement.charAt(0)=="r"){validateRadio()}
        else if(myElement.charAt(0)=="n"){validateNumber()}
        else if(myElement.charAt(0)=="#"){validateNumLen()}
        else if(myElement.charAt(0)=="e"){validateEmail()}
        }
	if(mySwitch){break}
    }
	
if(!mySwitch){myform.submit()}
}



//VALIDATE THERE'S SOMETHING IN TEXTFIELD//////////////////////////////////////////////////////////////

function emptyField(){
mySwitch=false
var space
space=false

for(var a=0;a<myform.elements[validateCounter].value.length;a++){
	if(myform.elements[validateCounter].value.charAt(a)==" "){
		space=true
		}
	else{
		mySwitch=true
		}
	}
	
if(space && !mySwitch){
	mySwitch=true
	}
else{
	mySwitch=false
	}
	
if(mySwitch || myform.elements[validateCounter].value==""){
	if(formBytes[myElement]!=null){
		alert(formBytes[myElement])
		mySwitch=true
		}
	else{alert("Please fill in this field as it is required.")}
		myform.elements[validateCounter].value=""
        myform.elements[validateCounter].focus()
        mySwitch=true
        }
else{mySwitch=false}
}






//SELECT / DROPDOWN MENUS///////////////////////////////////////////////////////////////////////////////

function validateSelect(){
mySwitch=false

if(myform.elements[validateCounter].selectedIndex==0){
	if(formBytes[myElement]!=null){
		alert(formBytes[myElement])
		}
	else{
		alert("Please make a selection from this dropdown menu as it is required.")
		}
	myform.elements[validateCounter].focus()
	mySwitch=true
	}
}






//RADIO BUTTONS//////////////////////////////////////////////////////////////////////////////////////

function validateRadio(){
mySwitch=false
counter=0

while(myform.elements[validateCounter+counter].name==myElement){
	if(myform.elements[validateCounter+counter].checked){
		mySwitch=true
		}
	counter++
	}

if(!mySwitch){
	if(formBytes[myElement]!=null){
		alert(formBytes[myElement])
		}
	else{
		alert("Please select one of the following options as it is required.")
		}
	myform.elements[validateCounter].focus()
	mySwitch=true
	}
else{
    validateCounter=validateCounter+(counter-1)
	mySwitch=false
    }
counter=0
}





//VALIDATE NUMBER////////////////////////////////////////////////////////////////////////////////////////////

function validateNumber(){
emptyField()
if(!mySwitch && isNaN(myform.elements[validateCounter].value)){
	alert("Please fill this field in using ONLY valid numerals.")
	myform.elements[validateCounter].value=""
	myform.elements[validateCounter].focus()
	mySwitch=true
	}
}




//VALIDATE NUMBER////////////////////////////////////////////////////////////////////////////////////////////

function validateNumLen(){
emptyField()
if(!mySwitch){validateNumber()}
if(!mySwitch){
	counter=2
	var num=""
	while(!isNaN(myform.elements[validateCounter].name.charAt(counter))){
		num=num+myform.elements[validateCounter].name.charAt(counter)
		counter=counter+1
		}
		
	num=parseInt(num)
	if(!charCount(num)){
		if(num==1){
			alert("This field requires " + num + " numeral to be valid.")
			}
		else{
			alert("This field requires " + num + " numerals to be valid.")
			}
		myform.elements[validateCounter].value=""
		myform.elements[validateCounter].focus()
		mySwitch=true
		}
	}
}






//COUNT THE CHARACTERS////////////////////////////////////////////////////////////////////////////////

function charCount(swap){
if(myform.elements[validateCounter].value.length==swap){
	return true
	}
}





//EMAIL//////////////////////////////////////////////////////////////////////////////////////////////

function validateEmail(){
emptyField()
if(!charCheck("@") && !mySwitch){
	alert("Certain characters required for a valid email address are missing in this field.")
	myform.elements[validateCounter].focus()
	myform.elements[validateCounter].value=""
	mySwitch=true
	}
else if(!charCheck(".") && !mySwitch){
	alert("Certain characters required for a valid email address are missing in this field.")
	myform.elements[validateCounter].focus()
	myform.elements[validateCounter].value=""
	mySwitch=true
	}
}




//VALIDATE SPECIFIC CHARACTERS///////////////////////////////////////////////////////////////////

function charCheck(swap){
formTemp=myform.elements[validateCounter].value

for(var i=0;i<formTemp.length;i++){
	if(formTemp.charAt(i)==swap){
		return true
		}
	}
}




//////
//validate function
//////////

function noEntry() {
mt=document.contact.eventType.value;
if ((mt.length<1)||(mt.substring(0,6)=="******")) {
alert("You must include your event type");
document.contact.eventType.value="Complete This Entry";
document.contact.eventType.focus();
return false;
}
else { return true; }
}

//////
//validate function register
//////////

function noEntryR() {
mt=document.register.storelocation.value;
if ((mt.length<1)||(mt.substring(0,6)=="******")) {
alert("You must include a store location");
document.register.storelocation.value="Complete This Entry";
document.register.storelocation.focus();
return false;
}
else { return true; }
}

/////////////
//reset function
////////

function resetform(){
	document.contact.reset()
}

////////////


///////////////
//open window function
///////////////

var isClicked=0
var newWindow=null
function openWindow(swap1,swap2)
{
if((isClicked>0)&&(newWindow.closed==false))
        {
        newWindow.close();
        }
newWindow=window.open(swap1,'',swap2);
isClicked++
}
function closeWindow()
{
if(newWindow)
        {
        newWindow.close()
        }
}



//MODIFY ACCORDINGLY FOR WEBSPEED

// An adaptation of Dorcht's function for setting a cookie.
function setCookie(name, value, expires, path, domain, secure) {
  document.cookie = name + "=" + escape(value) + 
  ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
  ((path == null) ? "" : "; path=" + path) +
  ((domain == null) ? "" : "; domain=" + domain) +
  ((secure == null) ? "" : "; secure");
}

// An adaptation of Dorcht's function for deleting a cookie.
function delCookie (name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain) +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

// popup window script
var isClicked=0
var newWindow=null

function openWindow2()
{
if((isClicked>0)&&(newWindow.closed==false))
	{
	newWindow.close();
	}
newWindow=window.open('difference.html','','width=600,height=400,top=25,left=150,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=yes');
isClicked++
}


function closeWindow2()
{
if(newWindow)
	{
	newWindow.close()
	}
}

///////////////////
//rollover script
//////////////////

//ALL ROLLOVERS REQUIRE A NAMING PROTOCOL SUFFIXING IMAGE NAMES WITH "_ON" AND "_OFF"///////////////

function rollOn(swap,type){
document[swap].src="images/"+swap+"_on."+type
}

function rollOff(swap,type){
document[swap].src="images/"+swap+"_off."+type
}


var preload = new Array("menu_about","menu_custserv","menu_catalog","menu_contact")
var jpgpreload = new Array() 
var gifpreload = new Array() 

for(var a=0;a<preload.length;a++){
	gifpreload[a] = new Image() 
	gifpreload[a].src = 'images/' + preload[a] + '_on.gif'

	jpgpreload[a] = new Image() 
	jpgpreload[a].src = 'images/' + preload[a] + '_on.jpg'	
	}
	
////////////////////////////////////


function MakeArray(n) {
    this.length = n;
    for(var i=0;i<=n;i++)
        this[i] = 0;
    return this;
}

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
chosen = 'tool0';
urllist = new MakeArray(5);
urllist[1] = 'about_us.html';
urllist[2] = 'custserv.html';
urllist[3] = 'catalog.html';
urllist[4] = 'contact.html';

if (browserName == "Netscape" && browserVer >= 3) {
        version = "n3";
} else {
        version = "n2";
}
if (browserName == "Microsoft Internet Explorer" && browserVer >= 3) {
        version = "n3";
}

if(version == "n3") {
        tool1on = new Image();
        tool1off = new Image();
        tool1hi = new Image();
        tool1on.src = "./images/menu_about_on.gif";
        tool1off.src = "./images/menu_about_off.gif";
        tool1hi.src = "./images/menu_about_on.gif";

        tool2on = new Image();
        tool2off = new Image();
        tool2hi = new Image();
        tool2on.src = "./images/menu_attorneys_on.gif";
        tool2off.src = "./images/menu_attorneys_off.gif";
        tool2hi.src = "./images/menu_attorneys_on.gif";

        tool3on = new Image();
        tool3off = new Image();
        tool3hi = new Image();
        tool3on.src = "./images/menu_practice_on.gif";
        tool3off.src = "./images/menu_practice_off.gif";
        tool3hi.src = "./images/menu_practice_on.gif";
        
        tool4on = new Image();
        tool4off = new Image();
        tool4hi = new Image();
        tool4on.src = "./images/menu_trials_on.gif";
        tool4off.src = "./images/menu_trials_off.gif";
        tool4hi.src = "./images/menu_trials_on.gif";
       
        tool5on = new Image();
        tool5off = new Image();
        tool5hi = new Image();
        tool5on.src = "./images/menu_links_on.gif";
        tool5off.src = "./images/menu_links_off.gif";
        tool5hi.src = "./images/menu_links_on.gif";
        
        tool6on = new Image();
        tool6off = new Image();
        tool6hi = new Image();
        tool6on.src = "./images/menu_contact_on.gif";
        tool6off.src = "./images/menu_contact_off.gif";
        tool6hi.src = "./images/menu_contact_on.gif";

}

function img_act(imgName) {
		imgName="tool"+imgName
        if(version =="n3") {
                imgOn = eval(imgName + "on.src");
                document [imgName].src = imgOn;
        }
}

function img_inact(imgName) {alert(imgName)
        if(version=="n3") {
                imgOff = eval(imgName + "off.src");
                document [imgName].src = imgOff;
        }
}

function refresh(selected) {
	selected="tool"+selected
	if(chosen != selected) {
          for(var i=1;i<=6;i++) {
                        img_inact("tool" + i);
                }
                img_act(selected);
                chosen = selected;
        }
}

function redraw(selected) {
	selected="tool"+selected
        img_inact('tool0');
        img_act(selected);
        chosen = selected;
}

function highlight(imgName) {
	imgName="tool"+imgName
        if(chosen != imgName) {
                if(version=="n3") {
                        imgHi = eval(imgName + "hi.src");
                        document [imgName].src = imgHi;
                }
        }
}

function unhighlight(imgName) {
	imgName="tool"+imgName
        if(chosen != imgName) {
                if(version=="n3") {
                        imgOff = eval(imgName + "off.src");
                        document [imgName].src = imgOff;
                }
        }

}

///////////////////

//+++++++++++++++++++++++++
// function for inside rollover scripting
//+++++++++++++++++++++++++

function SideBar()
{	
	temp=""
	temp+="<TABLE width='150' cellpadding='0' cellspacing='0' border='0'><TR><TD class='tablemain1' bgcolor='#D0D0D0' valign='top' align='center'><A class='headtextsm' HREF='request_catalog.asp'>request a catalog</A></TD></TR><TR><TD halign='middle' align='center'><IMG width='150' height='2' SRC='./images/spacer.gif' border='0'></TD></TR><TR><TD class='tablemain33' height='175' bgcolor='#DCDADC' halign='middle' align='center'><A class='headtextsm' HREF='request_catalog.asp'><IMG vspace='5' width='132' class='tablemain1' height='167' SRC='./images/catalog_new.jpg' border='0' alt='FOX Catalog 2003'></a></TD></TR><TR><TD height='8' halign='middle' align='center'><IMG width='160' height='1' SRC='./images/grey_line_sm.gif' border='0'></TD></TR><TR><TD valign='top' align='center'><span class='headtextlg'>ORDER TOLL-FREE</span><BR><span class='headtextlgrd'>1.800.FOX.INTL</span><BR><span class='headtextlgrd2'>1.800.369.4685</span></TD></TR><TR><TD height='8' halign='middle' align='center'><IMG width='160' height='1' SRC='./images/grey_line_sm.gif' border='0'></TD></TR><TR><TD valign='top' align='center'><span class='headtextlg'>24-HOUR FAX</span><BR><span class='headtextlgrd'>1.800.FOX.9110</span><BR><span class='headtextlgrd2'>1.800.369.9110</span></TD></TR><TR><TD height='8' halign='middle' align='center'><IMG width='160' height='1' SRC='./images/grey_line_sm.gif' border='0'></TD></TR><TR><TD valign='top' align='center'><span class='headtextlg'>CALL CENTER HOURS</span><BR><span class='headtextlgrd2'>M - F 8:30 AM - 5:00 PM EST</span><BR><span class='headtextlg'>SHOWROOM HOURS</span><BR><span class='headtextlgrd2'>M - F 8:30 AM - 5:00 PM EST</span><BR></TD></TR><TR><TD height='8' halign='middle' align='center'><IMG width='160' height='1' SRC='./images/grey_line_sm.gif' border='0'></TD></TR><TR><TD class='tablemain1' bgcolor='#D0D0D0' valign='top' align='center'><A HREF='vendors.asp'><span class='headtextsm'>featured vendor links</span></a></TD></TR><TR><TD halign='middle' align='center'><IMG width='150' height='2' SRC='./images/spacer.gif' border='0'></TD></TR><TR><TD class='tablemain33' bgcolor='#DCDADC' halign='middle' align='center'><BR><A HREF='vendors.asp'><IMG width='125' height='23' SRC='./images/vendor_whelen.gif' border='0' alt='Whelen'></a><BR><BR><A HREF='vendors.asp'><IMG width='126' height='29' SRC='./images/vendor_federal.gif' border='0' alt='Federal Signal Corporation'></a><BR><BR><A HREF='vendors.asp'><IMG SRC='./images/streamlight.gif' border='0' alt='Streamlight'></a><BR><BR><A HREF='vendors.asp'><IMG width='125' height='31' SRC='./images/vendor_pointblank.gif' border='0' alt='Point Blank'></a><BR><BR><A HREF='vendors.asp'><IMG width='125' height='69' SRC='./images/vendor_thorogood.gif' border='0' alt='Thorogood'></a><BR><BR><A HREF='vendors.asp'><IMG SRC='./images/pelicanlogo.gif' border='0' alt='Pelican'></a><BR><BR><A HREF='vendors.asp'><IMG SRC='./images/surefire.gif' border='0' alt='Surefire'></a><BR><BR></TD></TR></TABLE>"
	document.write(temp)
}



function MainTopnav()
{	
	temp=""
	temp+="<FORM ACTION='search.asp' METHOD='POST' name='fox_search'><TABLE bgcolor='#505050' width='750' cellpadding='0' cellspacing='0' border='0'><TR><TD width='75' halign='middle' align='center'><span class='searchtext'>SEARCH</span></TD><TD width='115' valign='top'><INPUT TYPE='text' NAME='search' class='searchit' SIZE='15' class='search'></TD><TD width='84' valign='top'><a href='javascript:document.fox_search.submit()'><img src='./images/but_red_go.gif' border='0' name=''></a></TD><TD valign='top' width='100'><A HREF='about_us.asp' onMouseOver='rollOn(\"menu_aboutus\",\"gif\")' onMouseOut='rollOff(\"menu_aboutus\",\"gif\")'><IMG width='100' height='21' SRC='./images/menu_aboutus_off.gif' border='0' name='menu_aboutus'></a></TD><TD valign='top' width='128'><A HREF='custserv.asp' onMouseOver='rollOn(\"menu_custserv\",\"gif\")' onMouseOut='rollOff(\"menu_custserv\",\"gif\")'><IMG width='128' height='21' SRC='./images/menu_custserv_off.gif' border='0' name='menu_custserv'></a></TD><TD valign='top' width='80'><A HREF='catalog.asp' onMouseOver='rollOn(\"menu_catalog\",\"gif\")' onMouseOut='rollOff(\"menu_catalog\",\"gif\")'><IMG width='80' height='21' SRC='./images/menu_catalog_off.gif' border='0' name='menu_catalog'></a></TD><TD valign='top' width='86'><A HREF='contact.asp' onMouseOver='rollOn(\"menu_contact\",\"gif\")' onMouseOut='rollOff(\"menu_contact\",\"gif\")'><IMG width='86' height='21' SRC='./images/menu_contact_off.gif' border='0' name='menu_contact'></a></TD><TD width='81'>&nbsp;&nbsp;&nbsp;</TD></TR></TABLE></FORM>"
	document.write(temp)
}



function TopMenu()
{	
	temp=""
	temp+="<TABLE width='751' cellpadding='0' cellspacing='0' border='0'><TR><TD valign='top'><A HREF='about_us.html' onMouseOver='rollOn(\"menu_about\",\"gif\")' onMouseOut='rollOff(\"menu_about\",\"gif\")'><IMG width='98' height='20' SRC='./images/menu_about_off.gif' border='0' name='menu_about'></a></TD><TD valign='top'><A HREF='attorneys.asp' onMouseOver='rollOn(\"menu_attorneys\",\"gif\")' onMouseOut='rollOff(\"menu_attorneys\",\"gif\")'><IMG width='98' height='20' SRC='./images/menu_attorneys_off.gif' border='0' name='menu_attorneys'></a></TD><TD valign='top'><A HREF='practice_areas.html' onMouseOver='rollOn(\"menu_practice\",\"gif\")' onMouseOut='rollOff(\"menu_practice\",\"gif\")'><IMG width='120' height='20' SRC='./images/menu_practice_off.gif' border='0' name='menu_practice'></a></TD><TD valign='top'><A HREF='recent_trials.asp' onMouseOver='rollOn(\"menu_trials\",\"gif\")' onMouseOut='rollOff(\"menu_trials\",\"gif\")'><IMG width='120' height='20' SRC='./images/menu_trials_off.gif' border='0' name='menu_trials'></a></TD><TD valign='top'><A HREF='links.html' onMouseOver='rollOn(\"menu_links\",\"gif\")' onMouseOut='rollOff(\"menu_links\",\"gif\")'><IMG width='110' height='20' SRC='./images/menu_links_off.gif' border='0' name='menu_links'></a></TD><TD valign='top'><A HREF='contact.html' onMouseOver='rollOn(\"menu_contact\",\"gif\")' onMouseOut='rollOff(\"menu_contact\",\"gif\")'><IMG width='110' height='20' SRC='./images/menu_contact_off.gif' border='0' name='menu_contact'></a></TD><TD valign='top'><IMG width='95' height='20' SRC='./images/menu_last.gif' border='0'></a></TD></TR></TABLE>"
	document.write(temp)
}

///////////////////////////////

//+++++++++++++++++++++++++
// function for bottom text menu and copyright
//+++++++++++++++++++++++++

function BottomMenu()
{	
	temp=""
	temp+="<TABLE width='98%' cellpadding='0' cellspacing='0' border='0'><TR><TD valign='top' colspan='2' align='center'><A class='btlinks' HREF='about_us.asp'>about us</A>&nbsp;&nbsp;&nbsp;<A class='btlinks' HREF='custserv.asp'>customer service</A>&nbsp;&nbsp;&nbsp;<A class='btlinks' HREF='catalog.asp'>catalog</A>&nbsp;&nbsp;&nbsp;<A class='btlinks' HREF='contact.asp'>contact us</A>&nbsp;&nbsp;&nbsp;<A class='btlinks' HREF='index1.asp'>home</A><BR><span class='btlinks'>Copyright &#169; 2005 - 2008 Fox International, Inc. - All Rights Reserved</span></TD></TR></TABLE>"
		document.write(temp)
}

///////////////////////////////


//////////copyright

function FlashCopyright()
{	
	temp=""
	temp+="<TABLE width='98%' cellpadding='0' cellspacing='0' border='0'><TR><TD valign='top' colspan='2' align='center'><BR><span class='btlinks'>Copyright &#169; 2003 Fox International, Inc. - All Rights Reserved</span></TD></TR></TABLE>"
		document.write(temp)
}