var rights = new Date();
var RRyear = rights.getYear();
if(RRyear < 100) { RRyear = RRyear + 2000; } else { if(RRyear >= 100 && RRyear < 2000) { RRyear = RRyear + 1900; } }
var rightsreserved = "&copy;2006-" + RRyear + " GorillaJack.com&nbsp;&nbsp;All Rights Reserved."


months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
now = new Date();
year = now.getYear();
monthday = now.getDate();
monthday = monthday - 1;
if(monthday == 0) { monthday = 1;}
if(year < 100) { year = year + 2000; } else { if(year >= 100 && year < 2000) { year = year + 1900; } }
var datemodified = "Last Modified on " + months[now.getMonth()] + " " + monthday + ", " + year


function clearTextBox(obj)
	{
	if ((obj.value == "Enter your email address")||(obj.value == "SEARCH"))
	  {
		obj.value = "";
	  }
	}

function loadSearch() 
	{ 
  var searchText = document.getElementById("search-textbox"); 
  var searchButton = document.getElementById("search-button");

  searchText.onkeyup = function() { 
    if (event.keyCode=='13') { searchButton.click();} 
  }; 
 
  searchButton.onclick = function() { 
    if (searchText.value != '') { 
      window.location = '/search.aspx?find=' + encodeURIComponent(searchText.value).replace(/%20/g, '+'); 
      return false; 
    } 
  }; 
} 
  
MC.addLoadEvent(loadSearch);

/* CUSTOM GOOGLE TRANSLATION HACK */
var URL = location.href;

function goTrans(theLoc)
{
	var theTrans = theLoc.options[theLoc.selectedIndex].value
	if (theTrans != "-1" && theTrans != "" && theTrans != "0") {  location.href="http://translate.google.com/translate?hl=en&sl=en&tl="+theTrans+"&u="+escape(URL); }
}

if  (location.href.indexOf ("translate.google.com")==-1 && location.href.indexOf("https://www.gorillajack.com")==-1){

var Tran = "<strong>Translate this page:</strong><br>";
Tran = Tran + "<img src='images/icon_FR_22x14.gif' alt='' width='22' height='14' border='0'>&nbsp;<img src='images/icon_DE_22x14.gif' alt='' width='22' height='14' border='0'>&nbsp;<img src='images/icon_ES_22x14.gif' alt='' width='22' height='14' border='0'>&nbsp;<img src='images/icon_IT_22x14.gif' alt='' width='22' height='14' border='0'>&nbsp;<img src='images/icon_PH_22x14.gif' alt='' width='22' height='14' border='0'>&nbsp;<img src='images/icon_PL_22x14.gif' alt='' width='22' height='14' border='0'><br>";
Tran = Tran + "<SELECT NAME='TRANSLATE' size='1' style='width:200px;' onChange='goTrans(this.form.TRANSLATE)'>";
Tran = Tran + "<OPTION VALUE=-1>Select Language</OPTION>";
Tran = Tran + "<OPTION VALUE=-1>-------------------------</OPTION>";
Tran = Tran + "<OPTION VALUE='fr'>Traduire en francais</OPTION>";
Tran = Tran + "<OPTION VALUE='de'>Ubersetze auf Deutsch</OPTION>";
Tran = Tran + "<OPTION VALUE='es'>Traducir al Espanol</OPTION>";
Tran = Tran + "<OPTION VALUE='it'>Traduci in Italiano</OPTION>";
Tran = Tran + "<OPTION VALUE='tl'>Isalin sa Filipino</OPTION>";
Tran = Tran + "<OPTION VALUE='pl'>Przetlumaczyc na Polski</OPTION>";
Tran = Tran + "</select><br>";


var ICON = "<div class='francais_icon'><a href='http://translate.google.com/translate_c?hl=en&langpair=en%7Cfr&u="+escape(URL)+"'><img src='./images/icon_en_francais.gif' alt='Traduisez cette page en Francais' width='180' height='28' border='0'></a><br /></div>";
var TXT = "<a href='http://translate.google.com/translate_c?hl=en&langpair=en%7Cfr&u="+escape(URL)+"'>Traduire en Francais</a>";
} else {
var Tran = "";
var ICON = "";
var TXT = "";
}

/* ADDED FROM menu.js */
function toggleMenu(el, over)
{
    if (over) {
        Element.addClassName(el, 'over');
    }
    else {
        Element.removeClassName(el, 'over');
    }
}

/* ICONTACT */
function iContact()
   	{ 
		var emailText = document.getElementById("fields_email"); 
		var emailButton = document.getElementById("email-button");
		var emailredirect = document.getElementById("redirect");
		var emailerrorredirect = document.getElementById("errorredirect"); 
		
		if ((emailText.value==null)||(emailText.value==""))  {
		    	document.getElementById("fields_email").focus();
		    	alert("The Email field is required.");
		    	return false;
	  		}
		else
			{
				if (emailText.value == "Enter your email address")  {
						emailText.focus();
						alert("Please enter a valid email address.");
						return false;
					}
				else
					{
						if (document.location.protocol === "http:") {
							window.location = "http://app.icontact.com/icp/signup.php?fields_email=" + encodeURIComponent(emailText.value) + "&redirect=" + encodeURIComponent(emailredirect.value) + "&errorredirect=" + encodeURIComponent(emailerrorredirect.value) + "&listid=35122&specialid:35122=JCXF&clientid=192230&formid=464&reallistid=1&doubleopt=0";
							return false; 
						}
							
						if (document.location.protocol === "https:") {
							window.location = "https://app.icontact.com/icp/signup.php?fields_email=" + encodeURIComponent(emailText.value) + "&redirect=" + encodeURIComponent(emailredirect.value) + "&errorredirect=" + encodeURIComponent(emailerrorredirect.value) + "&listid=35122&specialid:35122=JCXF&clientid=192230&formid=464&reallistid=1&doubleopt=0";
							return false; 
						}																	
					}					
			}
	};
	
/* CURRENCY CONVERTER */
function USD(PriceUSD)
  	{
		var theURLUSD = "http://www.google.com/finance/converter?a=" + PriceUSD + "&from=CAD&to=USD";
    	window.open(theURLUSD,'currency','toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,width=300,height=300');
  	}
	
function GBP(PriceGBP)
  	{
		var theURLGBP = "http://www.google.com/finance/converter?a=" + PriceGBP + "&from=CAD&to=GBP";
    	window.open(theURLGBP,'currency','toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,width=300,height=300');
  	}
	
function AUD(PriceAUD)
  	{
		var theURLAUD = "http://www.google.com/finance/converter?a=" + PriceAUD + "&from=CAD&to=AUD";
    	window.open(theURLAUD,'currency','toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,width=300,height=300');
  	}
	
function EUR(PriceEUR)
  	{
		var theURLEUR = "http://www.google.com/finance/converter?a=" + PriceEUR + "&from=CAD&to=EUR";
    	window.open(theURLEUR,'currency','toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,width=300,height=300');
  	}
