function addEvent(a,c,b){if(typeof(b)==="function"){if(typeof(a)==="string"){a=document.getElementById(a);}if(a){if(a.addEventListener){a.addEventListener(c,b,false);}else{if(a.attachEvent){a.attachEvent("on"+c,b);}}}}}function loadSearchEngine(b,a){var c=function(){var g=document.getElementById("copyrights"),d,k,i,h;if(g!==null){d=new Date();k=d.getFullYear();i=document.createTextNode("Copyright © 2002-"+k+" World Wide Broadcast Network, Inc., Patent Pending, All rights reserved.");g.appendChild(i);}h=function(p){var m=document.getElementById("location"),j,l=null,o;if(!p){p=window.event;}if(p){if(p.currentTarget){o=p.currentTarget;}else{if(p.srcElement){o=p.srcElement;}}if(m&&o){if(m.type==="hidden"&&o.id.indexOf("local")!==-1){l="text";}else{if(m.type==="text"&&o.id.indexOf("local")===-1){l="hidden";}}if(l!==null){try{j=document.createElement("<input type='"+l+"' name='location'>");}catch(n){j=document.createElement("input");j.setAttribute("name","location");j.setAttribute("type",l);}j.id=j.name;j.value=m.value;m.parentNode.replaceChild(j,m);m=document.getElementById("localize");if(m){j=document.getElementById("searchlocalinfo");if(l==="hidden"){m.value=0;if(j){j.innerHTML="";}}else{m.value=1;if(j){j.innerHTML="*City and State or Zip Required";}}}}}}return false;};if(b){if(b.length>0){for(var e=0,f;e<b.length;e++){f=b[e];if(typeof(f)==="string"){f=document.getElementById(f);}if(f){addEvent(f,"click",h);}}}}if(typeof(a)==="function"){a();}};addEvent(window,"load",c);return false;}function showAddress(a,e,g,f){var d,i,c,h,b;c=function(j){if(j){if(g===true){a.setCenter(j,13);}if(e[0]!==null){i={title:e[0]};var k=new GMarker(j,i);a.addOverlay(k);var m=function(){var q="videodis"+e[3],r,s,p,o;r=e[0]+" "+e[1];s="<a target='_blank' href='"+e[7]+"'>Visit Website</a>";o='<div style="width:240px;height:100%;"><div style="height:180;" id="'+q+'"></div><div>'+r+"</div><div><div>"+s+"</div>";if(f.details===true){p="<a href='"+e[4]+"'>View Details</a>";o+="<div>"+p+"</div>";}o+="</div></div>";this.openInfoWindowHtml(o);return true;};GEvent.addListener(k,"click",m);var l=function(){var p=new DrawVideo("/includes/swf/mediaplayer.swf"),o;o="videodis"+e[3];p.initializeVideo(o,e[5],"240","180",null,e[6]);return true;};GEvent.addListener(k,"infowindowopen",l);var n=function(){var o="videodis"+e[3];cleanUpVideo(o);return true;};GEvent.addListener(k,"infowindowbeforeclose",n);}}};if(e[2].length>0){h=e[2].split(",");b=new GLatLng(parseFloat(h[0]),parseFloat(h[1]));c(b);}else{d=new GClientGeocoder();if(d){d.getLatLng(e[1],c);}}}function LoadMapSearchControl(d,e,h){if(d!==null&&e){if(d.length>0){var l,g=0,f,i=false;if(typeof h==="boolean"){i=h;h={};}else{if(typeof h==="object"){if(h.search){if(typeof h.search==="boolean"){i=h.search;}}}else{h={};}}if(d.length===1&&i===true){l={zoomControl:GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,title:d[0][0],idleMapZoom:GSmapSearchControl.ACTIVE_MAP_ZOOM-2,activeMapZoom:GSmapSearchControl.ACTIVE_MAP_ZOOM-2};f=document.getElementById(e);new GSmapSearchControl(f,d[0][1],l);g=1;}else{if(GBrowserIsCompatible()){f=document.getElementById(e);if(f){l={enableDoubleClickZoom:true};var a=new GMap2(f,l),k,b;a.addControl(new GSmallMapControl());a.addControl(new GMapTypeControl());g=d.length;b=false;for(var c=0;c<d.length;c++){k=false;if(c===0){if(d[c][0]===null||d.length===1){k=true;if(d[c][0]===null){g--;if(g===1){continue;}}}else{a.setCenter(new GLatLng(39.97803,-95.295274),4);}b=true;}else{if(b===false){k=true;}}showAddress(a,d[c],k,h);}}}}}}return g;}
