function popupform(uri,args,popupId,formId,frameId){if(null!=args){formElement=document.forms[formId];if(null!=formElement){qs=false;for(var i=0;i<args.length;i++){for(var j=0;j<formElement.elements.length;j++){entryElement=formElement.elements[j];if(entryElement.name==args[i]){uri=uri+(!qs?"?":"&")+args[i]+"="+entryElement.value;qs=true;break}}}}}document.getElementById(popupId).style.display="block";document.getElementById("c411PopupOverlay").style.display="block";document.getElementById(frameId).src=uri;return true}var isNN=(navigator.appName.indexOf("Netscape")!=-1);function autoFieldChange(input,len,e){var keyCode=(isNN)?e.which:e.keyCode;var filter=(isNN)?[0,8,9]:[0,8,9,16,17,18,37,38,39,40,46];if(input.value.length>=len&&!containsElement(filter,keyCode)){input.value=input.value.slice(0,len);input.form[(getIndex(input)+1)%input.form.length].focus()}function containsElement(arr,ele){var found=false,index=0;while(!found&&index<arr.length){if(arr[index]==ele){found=true}else{index++}}return found}function getIndex(input){var index=-1,i=0,found=false;while(i<input.form.length&&index==-1){if(input.form[i]==input){index=i}else{i++}}return index}return true}function isValidPhone(formId,fieldIds,msg){var numberTest=true;for(var i=0;(i<fieldIds.length)&&(numberTest===true);i++){element=document.forms[formId][fieldIds[i]];switch(fieldIds[i]){case"pac":numberTest=(""===element.value)||/^\d\d\d$/.test(element.value);break;case"pex":numberTest=(""===element.value)||/^\d\d\d$/.test(element.value);break;case"pnum":numberTest=(""===element.value)||/^\d\d\d\d$/.test(element.value);break;default:break}}if(numberTest===false){alert(msg)}return numberTest}var win;var winStatus;var winname="infoWin";function openWin(file,w,h,rs){if(!w){w=450}if(!h){h=300}if(!rs){rs="yes"}var left=parseInt((screen.availWidth/2)-(w/2));var top=parseInt((screen.availHeight/2)-(h/2));winStatus=true;win=window.open(file,winname,"toolbar=no,location=no,directories=no,status=no,menubar=no,resizable="+rs+",copyhistory=no,scrollbars=yes,width="+w+",height="+h+",left="+left+",top="+top);win.creator=self;win.focus()}function closeWin(){top.opener.winStatus=false;top.close()}var sizeCount=0;var sizePref=0;var textSize=new Array(1,1.1,1.3,1.5);var footerTextSize=new Array(0.9,1,1.1,1.3);var fontSizes=new Array("1em","1.1em","1.3em","1.5em");function applyTextsize(){var fontSizeOnLoad=GetCookies("textSize_pref");if((0<=fontSizeOnLoad)&&(3>=fontSizeOnLoad)){sizecount=fontSizeOnLoad}else{sizeCount=1}document.body.style.fontSize=fontSizes[sizeCount]}function textSizePref(lang){var textSizePref=GetCookies("textSize_pref");if(textSizePref>0){enlargeText(textSizePref,lang)}}function reduceText(lang){if(sizeCount!=0){sizeCount=parseInt(sizeCount)}sizeCount=sizeCount-1;if(sizeCount<=0){sizeCount=0}document.getElementById("contentArea").style.fontSize=textSize[sizeCount]+"em";if(document.getElementById("c411Footer")){document.getElementById("c411Footer").style.fontSize=footerTextSize[sizeCount]+"em"}if(lang=="en"){var siteUrl=".yellowpages.ca"}else{var siteUrl=".pagesjaunes.ca"}var exp=new Date();var expDays=365;exp.setTime(exp.getTime()+(expDays*24*60*60*1000));SetCookie("textSize_pref",sizeCount,exp,"/",siteUrl);window.status=sizeCount}function enlargeText(tSize,lang){if(sizeCount!=0){sizeCount=parseInt(sizeCount)}var textOptLength=textSize.length-1;if(tSize!=null){sizeCount=tSize}else{sizeCount=sizeCount+1}if(sizeCount>=textOptLength){sizeCount=textOptLength}document.getElementById("contentArea").style.fontSize=textSize[sizeCount]+"em";if(document.getElementById("c411Footer")){document.getElementById("c411Footer").style.fontSize=footerTextSize[sizeCount]+"em"}if(lang=="en"){var siteUrl=".yellowpages.ca"}else{var siteUrl=".pagesjaunes.ca"}var exp=new Date();var expDays=365;exp.setTime(exp.getTime()+(expDays*24*60*60*1000));SetCookie("textSize_pref",sizeCount,exp,"/",siteUrl);window.status=sizeCount}function GetCookies(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg){return getCookieVal(j)}i=document.cookie.indexOf(" ",i)+1;if(i==0){break}}return null}function SetCookie(name,value){var argv=SetCookie.arguments;var argc=SetCookie.arguments.length;var expires=(argc>2)?argv[2]:null;var path=(argc>3)?argv[3]:null;var domain=null;var secure=(argc>5)?argv[5]:false;document.cookie=name+"="+escape(value)+((expires==null)?"":("; expires="+expires.toGMTString()))+((path==null)?"":("; path="+path))+((domain==null)?"":("; domain="+domain))+((secure==true)?"; secure":"")}function DeleteCookie(name){var exp=new Date();exp.setTime(exp.getTime()-1);var cval=GetCookies(name);document.cookie=name+"="+cval+"; expires="+exp.toGMTString()}function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1){endstr=document.cookie.length}return unescape(document.cookie.substring(offset,endstr))}function showStatus(displayText){window.status=displayText;return true}function toggleDisplay(one,other,displayAttr){if(document.getElementById(one).style.display=="none"){document.getElementById(one).style.display=displayAttr;document.getElementById(other).style.display="none"}else{document.getElementById(one).style.display="none";document.getElementById(other).style.display=displayAttr}}function toggleVisibility(one,other){if(document.getElementById(one).style.visibility=="hidden"){document.getElementById(one).style.visibility="visible";document.getElementById(other).style.visibility="hidden"}else{document.getElementById(one).style.visibility="hidden";document.getElementById(other).style.visibility="visible"}}function switchReportErrorLink(target){try{if(target=="wp"){document.getElementById("wp_report_error").style.display="inline";document.getElementById("yp_report_error").style.display="none"}else{document.getElementById("wp_report_error").style.display="none";document.getElementById("yp_report_error").style.display="inline"}}catch(err){}}function switchForms(selectedObj){if(selectedObj=="people"){document.getElementById("businessForm").style.display="none";document.getElementById("peopleForm").style.display="inline";switchReportErrorLink("wp")}else{if(selectedObj=="business"){document.getElementById("peopleForm").style.display="none";document.getElementById("businessForm").style.display="inline";switchReportErrorLink("yp")}}}function makeMapStatusCookie(mapName,lang){}function getListingLink(linkCount){var listingLink=document.getElementById("mapLink"+linkCount);var listingURL=listingLink.getAttribute("href");var i=listingURL.indexOf("/");listingURL=listingURL.slice(i);window.open(listingURL)}tab=1;recurse=new Array();if(document.all&&!document.getElementById){document.getElementById=function(id){return document.all[id]}}function setTabs(node){if(node==null){return}for(j=0;j<node.childNodes.length;j++){child=node.childNodes[j];if(child.nodeType==1){if(child.nodeName=="INPUT"||child.nodeName=="SELECT"||child.onClick!=null){if(child.type!="hidden"){try{child.tabIndex=tab;tab++}catch(e){}}}if(child.childNodes.length>0){recurse.push(j);recurse.push(node);setTabs(child);node=recurse.pop();j=recurse.pop()}}}}function getHTTPObject(){var httpRequest;try{httpRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{httpRequest=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){try{httpRequest=new XMLHttpRequest()}catch(e){return false}}}return httpRequest}Hilite={elementid:"content",elementclass:null,exact:true,max_nodes:1000,onload:true,style_name:"hilite",style_name_suffix:true,debug_referrer:"",keyword_override:""};Hilite.search_engines=[["^http://.*","what="]];Hilite.decodeReferrer=function(referrer){var query=null;var match=new RegExp("");for(var i=0;i<Hilite.search_engines.length;i++){match.compile(Hilite.search_engines[i][0],"i");if(referrer.match(match)){match.compile("^.*"+Hilite.search_engines[i][1]+"([^&]+)&?.*$");query=referrer.replace(match,"$1");if(query){query=decodeURIComponent(query);query=query.replace(/\'|"/,"");query=query.split(/[\s,\+\.]+/);return query}}}return null};Hilite.hiliteElement=function(elm,query){if(!query||elm.childNodes.length==0){return}var qre=new Array();for(var i=0;i<query.length;i++){query[i]=query[i].toLowerCase();if(Hilite.exact){qre.push("\\b"+query[i]+"\\b")}else{qre.push(query[i])}}qre=new RegExp(qre.join("|"),"i");var stylemapper={};for(var i=0;i<query.length;i++){stylemapper[query[i]]=Hilite.style_name+(i+1)}var textproc=function(node){var match=qre.exec(node.data);if(match){var val=match[0];var k="";var node2=node.splitText(match.index);var node3=node2.splitText(val.length);var span=node.ownerDocument.createElement("SPAN");node.parentNode.replaceChild(span,node2);span.className=stylemapper[val.toLowerCase()];span.appendChild(node2);return span}else{return node}};Hilite.walkElements(elm.childNodes[0],1,textproc)};Hilite.hilite=function(){var q=Hilite.debug_referrer?Hilite.debug_referrer:document.referrer;var e=null;q=Hilite.keyword_override?[Hilite.keyword_override]:Hilite.decodeReferrer(q);if(q&&((Hilite.elementid&&(e=document.getElementById(Hilite.elementid)))||(e=document.body))){Hilite.hiliteElement(e,q)}};Hilite.walkElements=function(node,depth,textproc){var skipre=/^(script|style|textarea)/i;var count=0;while(node&&depth>0){count++;if(count>=Hilite.max_nodes){var handler=function(){Hilite.walkElements(node,depth,textproc)};setTimeout(handler,50);return}if(node.nodeType==1){if(!skipre.test(node.tagName)&&node.childNodes.length>0){node=node.childNodes[0];depth++;continue}}else{if(node.nodeType==3&&(node.className==Hilite.elementclass||node.parentNode.className==Hilite.elementclass)){node=textproc(node)}}if(node.nextSibling){node=node.nextSibling}else{while(depth>0){node=node.parentNode;depth--;if(node.nextSibling){node=node.nextSibling;break}}}}};if(Hilite.onload){if(window.attachEvent){window.attachEvent("onload",Hilite.hilite)}else{if(window.addEventListener){window.addEventListener("load",Hilite.hilite,false)}else{var __onload=window.onload;window.onload=function(){Hilite.hilite();__onload()}}}}function ToggleChild(parent,child,visible,hidden){this.parentId=parent;this.childId=child;this.visibleClass=visible;this.hiddenClass=hidden}ToggleChild.prototype.toggle=function(){var parent=document.getElementById(this.parentId);var child=document.getElementById(this.childId);if((null!=parent)&&(null!=child)){if("none"==parent.style.display){child.setAttribute("class",this.hiddenClass);child.setAttribute("className",this.hiddenClass)}else{child.setAttribute("class",this.visibleClass);child.setAttribute("className",this.visibleClass)}}};function ToggleMenu(id,itemId,menuId,display,delay){this.id=id;this.itemId=itemId;this.menuId=menuId;this.display=display;this.delay=delay;this.timerId=0;this.children=new Array()}ToggleMenu.prototype.getItemId=function(){return this.itemId};ToggleMenu.prototype.isExpanded=function(){return document.getElementById(this.menuId).style.display==this.display};ToggleMenu.prototype.addChild=function(id,visible,hidden){this.children[this.children.length]=new ToggleChild(this.menuId,id,visible,hidden)};ToggleMenu.prototype.cancelToggle=function(){if(0!=this.timerId){clearTimeout(this.timerId);this.timerId=0}};ToggleMenu.prototype.delayVisible=function(visible){this.cancelToggle();if((null!=this.delay)&&(0<this.delay)){this.timerId=setTimeout(this.id+".setVisible('"+visible+"')",this.delay)}else{this.setVisible(visible)}};ToggleMenu.prototype.setVisible=function(visible){var menuElement=document.getElementById(this.menuId);if(("true"==visible)&&(this.display!=menuElement.style.display)){menuElement.style.display=this.display;this.toggleChildren()}else{if(("false"==visible)&&("none"!=menuElement.style.display)){menuElement.style.display="none";this.toggleChildren()}}};ToggleMenu.prototype.toggleChildren=function(){for(var i=0;i<this.children.length;i++){this.children[i].toggle()}};ToggleMenu.prototype.toggleVisible=function(){var menuElement=document.getElementById(this.menuId);if(this.display!=menuElement.style.display){menuElement.style.display=this.display;this.toggleChildren()}else{menuElement.style.display="none";this.toggleChildren()}};function setNodeTabs(root,node){if(node==null){return}for(j=0;j<node.childNodes.length;j++){child=node.childNodes[j];if(child.nodeType==1){if(root.id=="c411SearchOptionNavBar"){if(child.nodeName=="A"){try{child.tabIndex=tab;tab++}catch(e){}}}else{if(child.nodeName=="INPUT"||child.nodeName=="SELECT"||child.onClick!=null){if(child.type!="hidden"){try{child.tabIndex=tab;tab++}catch(e){}}}}if(child.childNodes.length>0){recurse.push(j);recurse.push(node);setNodeTabs(root,child);node=recurse.pop();j=recurse.pop()}}}}function setFocus(tabIds,formId,inputId){if(null!=tabIds){for(var i=0;i<tabIds.length;i++){var element=document.getElementById(tabIds[i]);if(null!=element){setNodeTabs(element,element)}}}if((null!=formId)&&(null!=inputId)){document.forms[formId][inputId].focus()}}function addLocation(locations,name,list){locations[name]=new Array(4);locations[name]["st"]=list[0];locations[name]["ci"]=list[1];locations[name]["pv"]=list[2];locations[name]["pc"]=list[3]}function addAddress(addrs,i,list){addrs[i]=new Array(6);for(var j=0;j<list.length;j++){addrs[i][j]=list[j]}for(var j=list.length;j<6;j++){addrs[i][j]=null}}function changeLocation(locations,name,id,dir){if(null!=dir){if(""!=name){document.forms[id][dir+"St"].value=locations[name]["st"];document.forms[id][dir+"Ci"].value=locations[name]["ci"];document.forms[id][dir+"Pc"].value=locations[name]["pc"];for(var i=0;i<document.forms[id][dir+"Pv"].length;i++){if(document.forms[id][dir+"Pv"][i].value==locations[name]["pv"]){document.forms[id][dir+"Pv"].selectedIndex=i}}return false}else{document.forms[id][prefix+"St"].value="";document.forms[id][prefix+"Ci"].value="";document.forms[id][prefix+"Pc"].value="";document.forms[id][prefix+"Pv"].selectedIndex=0;return false}}else{if(""!=name){document.forms[id]["st"].value=locations[name]["st"];document.forms[id]["ci"].value=locations[name]["ci"];document.forms[id]["pc"].value=locations[name]["pc"];for(var i=0;i<document.forms[id]["pv"].length;i++){if(document.forms[id]["pv"][i].value==locations[name]["pv"]){document.forms[id]["pv"].selectedIndex=i;if(document.getElementById("uniform-pv")!=null){document.getElementById("uniform-pv").firstChild.innerHTML=document.forms[id]["pv"].options[i].text}}}return false}else{document.forms[id]["st"].value="";document.forms[id]["ci"].value="";document.forms[id]["pc"].value="";document.forms[id]["pv"].selectedIndex=0;return false}}}function setSingleAddress(addr,formId,dir){if(null!=dir){document.forms[formId][dir+"St"].value=addr[0];document.forms[formId][dir+"Ci"].value=addr[1];document.forms[formId][dir+"Pv"].value=addr[2];document.forms[formId][dir+"Pc"].value=addr[3];if(null!=addr[4]){document.forms[formId][dir+"lat"].value=addr[4]}if(null!=addr[5]){document.forms[formId][dir+"lon"].value=addr[5]}}else{document.forms[formId]["st"].value=addr[0];document.forms[formId]["ci"].value=addr[1];document.forms[formId]["pv"].value=addr[2];document.forms[formId]["pc"].value=addr[3];if(null!=addr[4]){document.forms[formId]["lat"].value=addr[4]}if(null!=addr[5]){document.forms[formId]["lon"].value=addr[5]}}}function setAddress(addrs,i,id,dir,sas){if((null!=addrs)&&(i<addrs.length)&&(null!=addrs[i])){if(null!=dir){document.forms[id][dir+"St"].value=addrs[i][0];document.forms[id][dir+"Ci"].value=addrs[i][1];document.forms[id][dir+"Pv"].value=addrs[i][2];document.forms[id][dir+"Pc"].value=addrs[i][3];if((null!=addrs[i][4])&&(null!=document.forms[id][dir+"lat"])){document.forms[id][dir+"lat"].value=addrs[i][4]}if((null!=addrs[i][5])&&(null!=document.forms[id][dir+"lon"])){document.forms[id][dir+"lon"].value=addrs[i][5]}if(null!=sas){document.forms[id][dir+"Sa"].value=sas[i]}}else{document.forms[id]["st"].value=addrs[i][0];document.forms[id]["ci"].value=addrs[i][1];document.forms[id]["pv"].value=addrs[i][2];document.forms[id]["pc"].value=addrs[i][3];if((null!=addrs[i][4])&&(null!=document.forms[id]["lat"])){document.forms[id]["lat"].value=addrs[i][4]}if((null!=addrs[i][5])&&(null!=document.forms[id]["lon"])){document.forms[id]["lon"].value=addrs[i][5]}if(null!=sas){document.forms[id]["sa"].value=sas[i]}}}}function setLmAddress(addrs,i,id,dir){if(null!=dir){document.forms[id][dir+"Lm"].value=addrs[i][0];document.forms[id][dir+"St"].value="";document.forms[id][dir+"Ci"].value=addrs[i][1];document.forms[id][dir+"Pv"].value=addrs[i][2];document.forms[id][dir+"Pc"].value=addrs[i][3];document.forms[id][dir+"Lat"].value=addrs[i][4];document.forms[id][dir+"Lon"].value=addrs[i][5]}else{document.forms[id]["lm"].value=addrs[i][0];document.forms[id]["st"].value="";document.forms[id]["ci"].value=addrs[i][1];document.forms[id]["pv"].value=addrs[i][2];document.forms[id]["pc"].value=addrs[i][3];document.forms[id]["lat"].value=addrs[i][4];document.forms[id]["lon"].value=addrs[i][5]}}function setFormDirection(formId,dir){document.forms[formId][dir+"St"].value=document.forms[formId]["St"].value;document.forms[formId][dir+"Ci"].value=document.forms[formId]["Ci"].value;document.forms[formId][dir+"Pv"].value=document.forms[formId]["Pv"][document.forms[formId]["Pv"].selectedIndex].value;document.forms[formId][dir+"Pc"].value=document.forms[formId]["Pc"].value;document.forms[formId][dir+"Lm"].value=document.forms[formId]["Lm"].value;return false}function swapFormDirection(addr,formId,dir){setFormDirection(formId,(("to"==dir)?"from":"to"));setSingleAddress(addr,formId,dir);document.forms[formId][dir+"Lm"].value="";return false}var origbackcolor;var origtextcolor;function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null){node=document}if(tag==null){tag="*"}var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\\\s)"+searchClass+"(\\\\s|$)");for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++}}return classElements}function highLite(id){origbackcolor=document.getElementById(id).style.backgroundColor;origtextcolor=document.getElementById(id).style.color;var reflink=document.getElementById(id);reflink.style.backgroundColor="#FFFAF0";reflink.style.color="#003A6E"}function unHighLite(id){var reflink=document.getElementById(id);reflink.style.backgroundColor=origbackcolor;reflink.style.color=origtextcolor}var showmenu=true;function toggleRefMenu(){if(showmenu){highLite("reflink");document.getElementById("refimg").src="/images/up_filter.gif"}else{unHighLite("reflink");document.getElementById("refimg").src="/images/down_filter.gif"}if(showrefinement){var refmenu=document.getElementById("refmenu");refmenu.style.display=(showmenu)?"block":"none";var menulist=document.getElementById("refmenu").getElementsByTagName("span");for(var i=0;i<menulist.length;i++){menulist[i].style.display=(showmenu)?"block":"none"}if(showmenu){refmenu.style.backgroundColor="#FFFAF0"}}showmenu=!showmenu}var expanded=true;function toggleRefMenuItem(id){getElementsByClass("refarea",document.getElementById(id))[0].style.display=(expanded)?"inline":"none";var menulist=document.getElementById(id).getElementsByTagName("li");for(var i=0;i<menulist.length;i++){if(expanded){menulist[i].style.display="block"}else{menulist[i].style.display="none"}}var height=(expanded)?getElementsByClass("refarea",document.getElementById(id))[0].scrollHeight:0;getElementsByClass("refarea",document.getElementById(id))[0].style.height=(height>330)?330:height;getElementsByClass("refarea",document.getElementById(id))[0].style.display="none";getElementsByClass("refarea",document.getElementById(id))[0].style.display=(expanded)?"inline":"none";expanded=!expanded}var randomnumber=nvmRandom();function nvmRandom(){var axel=Math.random()+"";return Math.round(axel*10000000000000000)}function nvmBigBox(code){document.write('<script type="text/javascript" language="JavaScript" src="http://ads.networldmedia.net/servlet/ajrotator/'+code+"/0/vj?z=networld&amp;dim=148898&amp;pos=2&amp;pv="+randomnumber+'"><\/script>')}function nvmSky(code){document.write('<script type="text/javascript" language="JavaScript" src="http://ads.networldmedia.net/servlet/ajrotator/'+code+"/0/vj?z=networld&amp;dim=148891&amp;pos=3&amp;pv="+randomnumber+'"><\/script>')}var c411PostloadFunctions=[];function c411PostloadAdd(fn){c411PostloadFunctions[c411PostloadFunctions.length]=fn}function c411PostloadInvoke(){for(var i=0;i<c411PostloadFunctions.length;i++){if(null!==c411PostloadFunctions[i]){c411PostloadFunctions[i]()}}};
