﻿<!--
//function noErrorMessages () { return true; }
//window.onerror = noErrorMessages;

var mnuSelected = ''; 
var cursorApp = '';
var dom=(document.getElementById)

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

function showMenu(menu){
	
	if (window.loaded){

		//if(mnuSelected != ''){
		//hideMenu(mnuSelected);
		//}

		if (dom) {
		document.getElementById(menu).style.visibility = 'visible';
		}
	}
	
mnuSelected = menu;
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
function hideMenu(menu){

	if (dom) {
		document.getElementById(menu).style.visibility = 'hidden';
		}
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

function menuchange(which,scheme){
var agt=navigator.userAgent.toLowerCase();
	
	if(agt.indexOf("msie") != -1 && agt.indexOf("opera") == -1){
		cursorApp = "hand"
	} else {
		cursorApp = "pointer"
	}

	switch (scheme){
		case ("menu") : table_color="#A2A1A6"; font_color="#EE1F25"; font_weight="bold"; font_style=""; cursor=cursorApp;
		break;
		case ("menu_off") : table_color= "#414143"; font_color="#FFFFFF"; font_weight=""; font_style=""; cursor="normal";
		break;
		default : color=which.style.color; font_color=which.style.backgroundColor; cursor="normal" ;
	}
	

	which.style.backgroundColor = table_color;
	which.style.fontWeight = font_weight;
	which.style.color = font_color;
	which.style.textDecoration = font_style;
	which.style.cursor = cursorApp;
	
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

function menuchangelink (which,scheme) {
var agt=navigator.userAgent.toLowerCase();
	
	if(agt.indexOf("msie") != -1 && agt.indexOf("opera") == -1){
		cursorApp = "hand"
	} else {
		cursorApp = "pointer"
	}
	
	switch (scheme){
		case ("menu") : table_color="#A2A1A6"; font_color="#EE1F25"; font_weight="bold"; font_style=""; cursor="normal";
		break;
		case ("menu_off") : table_color= "#414143"; font_color="#FFFFFF"; font_weight="bold"; font_style=""; cursor="normal";
		break;
		case ("menu_w") : table_color= ""; font_color="#FFFFFF"; font_weight=""; font_style="underline"; cursor=cursorApp;
		break;
		case ("menu_w_off") : table_color= ""; font_color="#FFFFFF"; font_weight=""; font_style="none"; cursor="normal";
		break;
		case ("menu_rs") : table_color= ""; font_color=""; font_weight=""; font_style=""; cursor=cursorApp;
		break;
		case ("menu_rs_off") : table_color= ""; font_color=""; font_weight=""; font_style=""; cursor="normal";;
		break;
		default : color=which.style.color; font_color=which.style.backgroundColor; cursor="normal" ;
	}
	
	document.getElementById(which).style.color=font_color;
	document.getElementById(which).style.textDecoration = font_style;
	document.getElementById(which).style.cursor=cursorApp;
}


/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

var css_browser_selector = function() {
	var 
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
		var c=b+os+' js';
		h.className += h.className?' '+c:c;
		//alert(b);
}();


/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

function changeURL(url){
location.href="" + url
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

function setUpSearch() {
	if (document.getElementById("search_box").value == "" || document.getElementById("search_box").value == null) {
		document.getElementById("search_box").style.background="url('http://v029u45eby.maximumasp.com/LojackDev/images/search.gif')";
		if (navigator.userAgent.indexOf("Safari") != -1) {
			document.getElementById("search_box").value = "Search";
			document.getElementById("search_box").title = "Search";
		}
	}
}

function initPage() {

	setUpSearch();
	
	document.getElementById("search_box").onfocus = function() {
		this.style.background = "#FFFFFF";
		if (this.value == "Search") {
			this.value = "";
		}
	}
	
	document.getElementById("search_box").onblur = setUpSearch;
	
}

/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {

		topnav_02_over = newImage("/style%20library/lojack/nav/topnav_02-over.gif");
		topnav_03_over = newImage("/style%20library/lojack/nav/topnav_03-over.gif");
		topnav_04_over = newImage("/style%20library/lojack/nav/topnav_04-over.gif");
		topnav_05_over = newImage("/style%20library/lojack/nav/topnav_05-over.gif");
		topnav_06_over = newImage("/style%20library/lojack/nav/topnav_06-over.gif");
		topnav_07_over = newImage("/style%20library/lojack/nav/topnav_07-over.gif");
		topnav_08_over = newImage("/style%20library/lojack/nav/topnav_08-over.gif");
		topnav_09_over = newImage("/style%20library/lojack/nav/topnav_09-over.gif");

		Auto_01_over = newImage("/car/images/auto_01-over.gif");
		Auto_02_over = newImage("/car/images/auto_02-over.gif");
		Auto_03_over = newImage("/car/images/auto_03-over.gif");
		Auto_04_over = newImage("/car/images/auto_04-over.gif");
		Auto_05_over = newImage("/car/images/auto_05-over.gif");

		moto_01_over = newImage("/motorcycle/images/moto_01-over.gif");
		moto_02_over = newImage("/motorcycle/images/moto_02-over.gif");
		moto_03_over = newImage("/motorcycle/images/moto_03-over.gif");
		moto_04_over = newImage("/motorcycle/images/moto_04-over.gif");
		moto_05_over = newImage("/motorcycle/images/moto_05-over.gif");
		moto_06_over = newImage("/motorcycle/images/moto_06-over.gif");

		construction_01_over = newImage("/construction/images/const_01-over.gif");
		construction_02_over = newImage("/construction/images/const_02-over.gif");
		construction_03_over = newImage("/construction/images/const_03-over.gif");
		construction_04_over = newImage("/construction/images/const_04-over.gif");
		construction_05_over = newImage("/construction/images/const_05-over.gif");
		construction_06_over = newImage("/construction/images/const_06-over.gif");

		Fleet_01_over = newImage("/fleet/images/fleet_01-over.gif");
		Fleet_02_over = newImage("/fleet/images/fleet_02-over.gif");
		Fleet_03_over = newImage("/fleet/images/fleet_03-over.gif");
		Fleet_04_over = newImage("/fleet/images/fleet_04-over.gif");
		Fleet_05_over = newImage("/fleet/images/fleet_05-over.gif");
		Fleet_06_over = newImage("/fleet/images/fleet_06-over.gif");

		AboutUs_01_over = newImage("/about/images/aboutUs_01-over.gif");
		AboutUs_02_over = newImage("/about/images/aboutUs_02-over.gif");
		AboutUs_03_over = newImage("/about/images/aboutUs_03-over.gif");
		AboutUs_04_over = newImage("/about/images/aboutUs_04-over.gif");
		AboutUs_05_over = newImage("/about/images/aboutUs_05-over.gif");
		AboutUs_06_over = newImage("/about/images/aboutUs_06-over.gif");
		AboutUs_07_over = newImage("/about/images/aboutUs_07-over.gif");

		WL_01_over = newImage("/why/images/how-it-works-over.gif");
		WL_02_over = newImage("/why/images/insurance-discounts-over.gif");
		WL_03_over = newImage("/why/images/theft-facts-over.gif");
		WL_04_over = newImage("/why/images/what-is-lojack-over.gif");
		WL_05_over = newImage("/why/images/why-you-need-lojack-over.gif");

		preloadFlag = true;
	}
}

// -->