function showActiveContent()
{
var objObjectTags;
objObjectTags = document.getElementsByTagName("object"); 
for (var i = 0; i < objObjectTags.length; i++) { 
objObjectTags[i].outerHTML = objObjectTags[i].outerHTML; 
}
}

function BF_Alert()
{
	return confirm('Blue Fox does not provide, and is not responsible for, the product, service or overall website content available at the linked site. Our privacy policies do not apply to linked websites. Users should consult the privacy disclosures on the linked site for further information. To remain at Blue Fox, click cancel. To leave our site for the site you have selected, click OK. Thank you for visiting Blue Fox web site.')
}

// NAVIGATION /////////////////////////////////////////////////

var Base="../images/interface_images/nav/";

if (document.images) {
	
	
    productsDIM = new Image();   productsDIM.src = Base + "productsLIT.gif";
    productsLIT = new Image();   productsLIT.src = Base + "productsLIT.gif";
    
    aboutDIM = new Image();   aboutDIM.src = Base + "aboutDIM.gif";
    aboutLIT = new Image();   aboutLIT.src = Base + "aboutLIT.gif";

    mediaDIM = new Image();   mediaDIM.src = Base + "mediaDIM.gif";
    mediaLIT = new Image();   mediaLIT.src = Base + "mediaLIT.gif";

    whatsnewDIM = new Image();   whatsnewDIM.src = Base + "whatsnewDIM.gif";
    whatsnewLIT = new Image();   whatsnewLIT.src = Base + "whatsnewLIT.gif";
    
    linksDIM = new Image();   linksDIM.src = Base + "linksDIM.gif";
    linksLIT = new Image();   linksLIT.src = Base + "linksLIT.gif";
}

         
                
function imgOn(imgName,target) {
	if (document.images) {
		document[target].src = eval(imgName + "LIT.src");       
	}
}
                
function imgOff(imgName,target) {
	if (document.images) {
		document[target].src = eval(imgName + "DIM.src");       
	}
}

// ODD ROW COLOR /////////////////////////////////////////////////
function alternate(id){
 if(document.getElementsByTagName){  
   var table = document.getElementById(id);  
   var rows = table.getElementsByTagName("tr");  
   for(i = 0; i < rows.length; i++){          
 //manipulate rows
     if(i % 2 == 0){
       rows[i].className = "even";
     }else{
       rows[i].className = "odd";
     }      
   }
 }
}

function gotop(url) {
	if (document.ProductsLinks.selectName.options[document.ProductsLinks.selectName.selectedIndex].value == 0){
    	return false;
    }
   	top.location = url;        
}

function gotopabouts(url) {
	if (document.aboutStates.stateSelector.options[document.aboutStates.stateSelector.selectedIndex].value == 0){
  		return false;
    }else{
    	document.location = url;        
    }
}

function gotopaboutsCity(url) {
	if (document.aboutCity.citySelector.options[document.aboutCity.citySelector.selectedIndex].value == 0){
  		return false;
    }else{
    	document.location = url;        
    }
}

function gotopAdvancedSearch(url) {
	if (document.advancedSearch.productLine.options[document.advancedSearch.productLine.selectedIndex].value == 0){
  		return false;
    }else{
		//document.goAdvancedSearch.productType.value = document.advancedSearch.productLine.options[document.advancedSearch.productLine.selectedIndex].value;
    	document.location = url;        
    }
}


// The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)
// See:  http://www.msc.cornell.edu/~houle/javascript/randomizer.html
rnd.today=new Date();
rnd.seed=rnd.today.getTime();
function rnd() {
         rnd.seed = (rnd.seed*9301+49297) % 233280;
         return rnd.seed/(233280.0);
};
function rand(number) {
         return Math.ceil(rnd()*number);
};
// end central randomizer. -->


// WINDOW CLOSE AND LOADER /////////////////////////////////////////////////
function supressError() {
	return true;
}

function load(url) {
	window.onerror = supressError;
    opener.location.href = url;
    setTimeout('self.close()',1000);
}



// WINDOW OPENER /////////////////////////////////////////////////

var myWindow = 'LinkWindow';

function win(fileName) {
        window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=yes,toolbar=yes,width=550,height=400,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function winVER(fileName) {
        window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=yes,toolbar=yes,width=400,height=500,screenX=0,screenY=0,top=0,left=235')
}


var myWindow = 'LinkWindow';

function winSML(fileName) {
        window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=yes,toolbar=yes,width=300,height=250,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function instructionsPop(fileName) {
    window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=no,toolbar=no,width=380,height=800,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function lureColorsPop(fileName) {
    window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=no,toolbar=no,width=380,height=800,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function productDetailPop(fileName) {
    window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=no,toolbar=no,width=700,height=700,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function lureHowtofishPop(lurename,freshorsalt) {
    window.open('http://www.rapala.com/products/howto/fish/index.cfm?lurename=' + lurename + '&freshorsalt=' + freshorsalt,myWindow,'scrollbars=yes,resizable=yes,status=no,toolbar=no,width=600,height=600,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function knifeHowtofilletPop(fileName) {
    window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=no,toolbar=no,width=300,height=600,screenX=0,screenY=0,top=0,left=235')
}

var myWindow = 'LinkWindow';

function rodNumberingPop(fileName) {
    window.open(fileName,myWindow,'scrollbars=yes,resizable=yes,status=no,toolbar=no,width=700,height=500,screenX=0,screenY=0,top=0,left=235')
}

myWindow = 'LinkWindow';
function winMOV(fileName) {
        window.open(fileName,myWindow,'scrollbars=no,resizable=no,status=yes,toolbar=no,width=400,height=320,screenX=0,screenY=0,top=0,left=235')
}

myWindow = 'LinkWindow';
function proFishingGameWindow() {
        window.open('http://profishing.rapala.com/',myWindow,'scrollbars=yes,resizable=yes,status=yes,toolbar=no,width=700,height=800,screenX=0,screenY=0,top=0,left=235')
}
// DATE ///////////////////////////////////////////////////////////
	var today=new Date();
	
	function nameDay() {
	  var arg1=nameDay.arguments;
	  for (var i=0; i < arg1.length; i++) {
	    this[i]=arg1[i];
	  }
	  this.length=arg1.length;
	}
	
	function nameMonth() {
	  var arg2=nameMonth.arguments;
	  for (var i=0; i < arg2.length; i++) {
	    this[i]=arg2[i];
	  }
	  this.length=arg2.length;
	}

	function getString(date) {
	  var day=new nameDay("Sunday", "Monday", "Tuesday","Wednesday", "Thursday", "Friday","Saturday");
	  var month=new nameMonth("January","February","March","April","May","June","July","August","September","October","November","December");
	  var yy = date.getYear();
	  var year = (yy < 1000) ? yy + 1900 : yy;
	  
	  return day[date.getDay()] + ", " + month[date.getMonth()] + " " + date.getDate() + ", " + year;
	}
	
	function printDate(){	
		var display=getString(today);
		document.write(display);
	}
    

//DHTML Window script- Copyright Dynamic Drive (http://www.dynamicdrive.com)
//For full source code, documentation, and terms of usage,
//Visit http://www.dynamicdrive.com/dynamicindex9/dhtmlwindow.htm

var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=1")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="30px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+30+"px" : iecompattest().scrollTop*1+30+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none"
}

function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}   


function validateFeedbackForm() {
	if (document.feedback.firstName.value=="") {
		alert('You must fill in the first name field before submitting');
		document.feedback.firstName.focus();
		return false;
	}
	if (document.feedback.lastName.value=="") {
		alert('You must fill in the last name field before submitting');
		document.feedback.lastName.focus();
		return false;
	}
	if (document.feedback.address.value=="") {
		alert('You must fill in the address field before submitting');
		document.feedback.address.focus();
		return false;
	}
	if (document.feedback.city.value=="") {
		alert('You must fill in the city field before submitting');
		document.feedback.city.focus();
		return false;
	}
	if (document.feedback.state.value=="") {
		alert('You must fill in the state field before submitting');
		document.feedback.state.focus();
		return false;
	}
	if (document.feedback.zip.value=="") {
		alert('You must fill in the zip field before submitting');
		document.feedback.zip.focus();
		return false;
	}
	if (document.feedback.phone.value=="") {
		alert('You must fill in the phone field before submitting');
		document.feedback.phone.focus();
		return false;
	}
	if (document.feedback.email.value=="") {
		alert('You must fill in the email field before submitting');
		document.feedback.email.focus();
		return false;
	}
	if (document.feedback.email.value.length > 0 && document.feedback.email.value.length < 5) {
		alert('You have entered an invalid email address.  Please correct this before submitting');
		document.feedback.email.focus();
		return false;
	}
	if (document.feedback.email.value.indexOf("@")<0) {
    	alert('You have entered an invalid email address.  Please correct before submitting');
    	document.feedback.email.focus();
    	return false;
    }
}

