﻿<!--
	/* Image Swap for Territory Maps */
	function sfHover() {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);

	function MM_findObj(n, d) { //v4.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	/* End Image Swap */

	/* Breadcrumbs */
	function Breadcrumb() {
		// Begin customization
		this.homeLinkText = 'Home'; 	// Text for the home link
		this.separator = ' >> ';		// Character(s) to use between breadcrumbs
		this.homeLinkPosition = 0;			// Where is home? 0 = domain, 1 = 1st directory, and so on ...
		this.attachTo = '#breadcrumbs';	// Attach breadcrumb to a tag or an ID: e.g., body, h1, div, #header, #breadcrumb
		this.replaceTheseCharacters = [		// You can replace any text with customized text
			["%20", " "], [" - SR Marketing", ""], ["contact", "Contact Us"], ["dm", "Dedicated Micros"], ["acnc", "AC&NC"], ["atv", "ATV"], ["ip", "IP Solutions"],
			["flir", "FLIR"], ["geutebruck", "Geutebrück"], ["iei", "IEI"], ["iluminar", "Iluminar"], ["onssi", "OnSSI"], ["wcw", "Windy City Wire"], ["newproducts", "New Prodcuts"], ["demos", "On-line Demos"], 
			["support-training", "Support/Training"], ["pricing", "Current Pricing"], ["Manufacturers Directory", "Directory"], ["Directory - ", ""], ["On-line Demos - ", ""], 
			["Events - ", ""], ["IP - IEI", "IEI"], ["IP - OnSSI", "OnSSI"], ["IP - Sony", "Sony"], ["IP - Videolarm", "Videolarm"], ["AC&NC - ", ""], ["ATV - ", ""], 
			["Dedicated Micros - ", ""], ["Geutebruck - ", ""], ["Geutebrück - ", ""], ["Iluminar - ", ""], ["IEI - ", ""], ["IEI - ", ""], ["OnSSI - ", ""], ["Sony - ", ""], ["Tamron - ", ""], ["Videolarm - ", ""], 
			["Windy City Wire - ", ""], ["Clockaudio - ", ""], ["Lowell - ", ""], ["Paso - ", ""], ["Meet SR - ", ""], ["New Products - ", ""], ["meetsr", "Meet SR"],
			["News - ", ""], ["Current Pricing - ", ""], ["Promotions - ", ""], ["Promotions - ", ""], ["SR Marketing - Your Solutions Resource Company", "Home"], 
			// ["_", " "], // Replace underscores with spaces
			['', '']];
		// End customization
	 
		var homeText = this.homeLinkText;
		var sep = this.separator;
		var position = this.homeLinkPosition;
		var tag = this.attachTo;
		var replacements = this.replaceTheseCharacters;
		var d = document;
		var url = d.location.href.split('//')[1];
		var text = url;
		url = url.split('/');
		if(url[url.length-1] === '') {url.pop();}
		url.pop();
		var title = d.title;
		var rex;
		for (var i=0; i < replacements.length; i++) {
			rex = new RegExp(replacements[i][0], "g");
			text = text.replace(rex,replacements[i][1]);
			title = title.replace(rex,replacements[i][1]);
		}
		text = text.split('/');
	 
		function createBreadcrumbs() {
			var href = '', a, div = d.createElement('div');
			div.setAttribute('id', 'breadcrumbs');
			for (var i = 0; i < url.length; i++) {
				href += url[i] + '/';
				if (i < position) {continue;}
				if (i === position) {text[i] = homeText;}
				text[i] = text[i].charAt(0).toUpperCase() + text[i].substr(1);
				a = d.createElement('a');		
				a.setAttribute('href', 'http://' + href);
				a.appendChild(d.createTextNode(text[i]));
				div.appendChild(a);
				div.appendChild(d.createTextNode(sep));
			}
			div.appendChild(d.createTextNode(title));
			return div;
		}
	 
		function writeHTML() {
			tag = tag.match('#') ? d.getElementById(tag.substring(1)) : d.getElementsByTagName(tag)[0];
			if (tag) {
				tag.appendChild(createBreadcrumbs());
			}
		}
		this.output = writeHTML;
	}
	/* End Breadcrumbs */

	/* Drop Down Menu */
	function display (category) {
		var whichcategory = document.getElementById(category);
		if (whichcategory.className=="show") {
			whichcategory.className="hide";
		} else {
			whichcategory.className="show";
		}
	}
 	/* End Drop Down */
 
	/* Add Load */
	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload !== 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				oldonload();
				func();
			};
		}
	}
	 
	addLoadEvent(function() {
		var crumb = new Breadcrumb();
		crumb.output();					  
	});
	/* End Add Load */
	
//-->
