function Rapala_Alert()
{
	return confirm('Rapala 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 Rapala, click cancel. To leave our site for the site you have selected, click OK. Thank you for visiting Rapala web site.')
	
}

function Rapala_AlertAd()
{
	var status=confirm('Rapala 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 Rapala, click cancel. To leave our site for the site you have selected, click OK. Thank you for visiting Rapala web site.')
	if (status==true) { 
  		window.open('http://www.rapalagear.com/','RapalaGear','width=600,height=800,scrollbars=yes,resizable=yes');
		window.setTimeout('window.close()',10);
		
	} else {
		window.setTimeout('window.close()',10);
	}
}

function Rapala_OpenAd()
{
	window.open('http://www.rapalagear.com/','RapalaGear','width=600,height=800,scrollbars=yes,resizable=yes');
	window.setTimeout('window.close()',10);
}
function closeDelay()
{
	window.setTimeout('window.close()',10);
}





function showActiveContent()
{
var objObjectTags;
objObjectTags = document.getElementsByTagName("object"); 
for (var i = 0; i < objObjectTags.length; i++) { 
objObjectTags[i].outerHTML = objObjectTags[i].outerHTML; 
}
}

// NAVIGATION /////////////////////////////////////////////////

var Base="images/interface_images/nav/";

if (document.images) { 

	productsDIM = new Image();   productsDIM.src = Base + "productsDIM.gif";
    productsLIT = new Image();   productsLIT.src = Base + "productsLIT.gif";

    dealerDIM = new Image();   dealerDIM.src = Base + "dealerDIM.gif";
    dealerLIT = new Image();   dealerLIT.src = Base + "dealerLIT.gif";

 	newsDIM = new Image();   newsDIM.src = Base + "newsDIM.gif";
    newsLIT = new Image();   newsLIT.src = Base + "newsLIT.gif";

    investorDIM = new Image();   investorDIM.src = Base + "investorDIM.gif";
    investorLIT = new Image();   investorLIT.src = Base + "investorLIT.gif";

    proDIM = new Image();   proDIM.src = Base + "proDIM.gif";
    proLIT = new Image();   proLIT.src = Base + "proLIT.gif";
        
	aboutDIM = new Image();   aboutDIM.src = Base + "aboutDIM.gif";
    aboutLIT = new Image();   aboutLIT.src = Base + "aboutLIT.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");       
	}
}


// 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=650,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 openEnewsWindow() {
        window.open('showAd.cfm','Rapala','scrollbars=no,resizable=no,status=yes,toolbar=no,width=512,height=384,screenX=0,screenY=0,top=0,left=235')
}

function popup(Site)
 {
 window.open(Site,'PopupName','toolbar=no,statusbar=no,resizable=yes,location=no,scrollbars=yes,resizable=yes,width=405,height=450')
 }

function gotopDealers(url) {
	if (document.dealerStates.stateSelector.options[document.dealerStates.stateSelector.selectedIndex].value == 0){
  		return false;
    }else{
    	document.location = url;        
    }
}

var myWindow = 'LinkWindow';

function videoPop(fileName) {
    window.open(fileName,myWindow,'scrollbars=no,resizable=no,status=no,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);
	}
    
   function validatePassword() {
    if (document.changepassword.password.value=="") {
    	alert('You must fill in the Password field before submitting');
    	document.changepassword.password.focus();
    	return false;
    }
    if (document.changepassword.password.value.length > 0 && document.changepassword.password.value.length < 8) {
    	alert('Your password must be at least 8 characters long.  Please correct this before submitting');
    	document.changepassword.password.value="";
    	document.changepassword.confirmpassword.value="";
    	document.changepassword.password.focus();
    	return false;
    }
    if (document.changepassword.password.value!=document.changepassword.confirmpassword.value) {
    	alert('Your passwords do not match.  Please correct before submitting');
    	document.changepassword.password.value="";
    	document.changepassword.confirmpassword.value="";
    	document.changepassword.password.focus();
    	return false;
   }
   }
