var GLOBALS={addElement:function(parent,type,params){var newElem=document.createElement(type);if(params)for(key in params){newElem.setAttribute(key,params[key]);if(key=="class")newElem.setAttribute("className",params[key]);}if(parent)parent.appendChild(newElem);return newElem;}, addOnload:function(func){if(document.getElementById&&(window.addEventListener||window.attachEvent)){var prev=window.onload;if(!GLOBALS.isFunction(window.onload)){window.onload=func;}else{window.onload=function(){prev();func();};

}}}, addOnScroll:function(func){if(window.addEventListener) {window.addEventListener("DOMMouseScroll", func, false);window.addEventListener("scroll", func, false);}else if(document.addEventListener) {document.addEventListener("scroll", func, false);}else if(document.all && document.compatMode && (document.compatMode == "CSS1Compat"||document.compatMode == "BackCompat")) {if("onscroll" in self) {window.onscroll = func;};

};

document.onmousewheel = func;}, isArray:function(o) {return (o!=null && typeof(o)=="object" && typeof(o.length)=="number" && (o.length==0 || GLOBALS.isDefined(o[0])));}, isDefined:function(o) {return (typeof(o)!="undefined"&&o!="undefined");}, isFunction:function(o) {return (o!=null && typeof(o)=="function");}, isObject:function(o) {return (o!=null && typeof(o)=="object" && GLOBALS.isDefined(o.constructor) && o.constructor==Object && !GLOBALS.isDefined(o.nodeName));}, parseQueryString:function(query){var Params = {};

if ( ! query ) {return Params;}var Pairs = query.split(/[;&]/);for ( var i = 0;i < Pairs.length;i++ ) {var KeyVal = Pairs[i].split('=');if ( ! KeyVal || KeyVal.length != 2 ) {continue;}var key = unescape( KeyVal[0] );var val = unescape( KeyVal[1] );val = val.replace(/\+/g, ' ');Params[key] = val;}return Params;}, removeElement:function(elem){if(typeof elem=='string')elem=$.getById(elem);try{elem.parentNode.removeChild(elem);}catch(err){alert(elem.id+":"+err);}}, zero:function(n) {return (!GLOBALS.isDefined(n) || isNaN(n))?0:n;}};

var $={getByClass:function(str,node,tag){var classEls=new Array();var elements;node=!node?document:node;elements=!tag?node.all||node.getElementsByTagName('*'):node.getElementsByTagName(tag);var pattern=new RegExp('(^|\\s)'+str+'(\\s|$)');for(counter=0,found=0;counter<elements.length;counter++){if(pattern.test(elements[counter].className)){classEls[found]=elements[counter];found++;}}return classEls;}, getById:function(){var elements=new Array();for(var counter=0;counter<arguments.length;counter++){var arg=arguments[counter];if(typeof arg=='string')arg=document.getElementById(arg);if(arguments.length==1)return arg;elements.push(arg);}return elements;}, getByTag:function(str,node){if(node==null)node=document;return node.getElementsByTagName(str);}, getStyle:function(elem,style){if(!document.getElementById) return;var value = 0;try{if(document.defaultView) value = document.defaultView.getComputedStyle(elem, "").getPropertyValue(style);else if(elem.currentStyle){value = elem.currentStyle[style];}}catch(e){value=elem.style[style];}return value;}};

var SYSTEM = {browser:{name:"unknown",version:0}, os:"unknown", init: function () {SYSTEM.browser.name = SYSTEM.searchString(SYSTEM.dataBrowser) || "unknown";SYSTEM.browser.version = SYSTEM.searchVersion(navigator.userAgent) || SYSTEM.searchVersion(navigator.appVersion) || 0;SYSTEM.os = SYSTEM.searchString(SYSTEM.dataOS) || "unknown";}, searchString: function (data) {for (var i=0;i<data.length;i++) {var dataString = data[i].string;var dataProp = data[i].prop;this.versionSearchString = data[i].versionSearch || data[i].identity;if (dataString) {if (dataString.indexOf(data[i].subString) != -1) return data[i].identity;}else if (dataProp) return data[i].identity;}}, searchVersion: function (dataString) {var index = dataString.indexOf(SYSTEM.versionSearchString);if (index == -1) return;return parseFloat(dataString.substring(index+SYSTEM.versionSearchString.length+1));}, dataBrowser: [ {string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, {string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" }, {string: navigator.vendor, subString: "Apple", identity: "Safari", versionSearch: "Version" }, {prop: window.opera, identity: "Opera" }, {string: navigator.vendor, subString: "iCab", identity: "iCab" }, {string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, {string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, {string: navigator.vendor, subString: "Camino", identity: "Camino" }, {string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, {string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, {string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, {string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" }], dataOS : [ {string: navigator.platform, subString: "Win", identity: "Windows" }, {string: navigator.platform, subString: "Mac", identity: "Mac" }, {string: navigator.platform, subString: "Linux", identity: "Linux" }] };

SYSTEM.init();var SCREEN={body:null, documentHeight:0, documentWidth:0, scrollLeft:0, scrollTop:0, viewportHeight:0, viewportWidth:0, getBody:function(){if (document.body){return document.body;}var bodies=$.getByTag("body",document);if (bodies!=null && bodies.length>0){return bodies[0];}return null;}, getDocumentHeight:function() {var body = SCREEN.getBody();var innerHeight = (GLOBALS.isDefined(self.innerHeight)&&!isNaN(self.innerHeight))?self.innerHeight:0;if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {var topMargin = parseInt($.getStyle(body,'marginTop'),10) || 0;var bottomMargin = parseInt($.getStyle(body,'marginBottom'), 10) || 0;return Math.max(body.offsetHeight + topMargin + bottomMargin, document.documentElement.clientHeight, document.documentElement.scrollHeight, GLOBALS.zero(self.innerHeight));}return Math.max(body.scrollHeight, body.clientHeight, screen.zero(self.innerHeight));}, getDocumentWidth:function(){var width = 0;var body = SCREEN.getBody();if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {var rightMargin = parseInt($.getStyle(body,'marginRight'),10) || 0;var leftMargin = parseInt($.getStyle(body,'marginLeft'), 10) || 0;width = Math.max(body.offsetWidth + leftMargin + rightMargin, document.documentElement.clientWidth);}else {width = Math.max(body.clientWidth, body.scrollWidth);}if (isNaN(width) || width==0) {width = GLOBALS.zero(self.innerWidth);}return width;}, getScrollLeft:function(){if (document.documentElement && GLOBALS.isDefined(document.documentElement.scrollLeft) && document.documentElement.scrollLeft>0) {return document.documentElement.scrollLeft;}if (document.body && GLOBALS.isDefined(document.body.scrollLeft)) {return document.body.scrollLeft;}return null;}, getScrollTop:function(){if (document.documentElement && GLOBALS.isDefined(document.documentElement.scrollTop) && document.documentElement.scrollTop>0){return document.documentElement.scrollTop;}if (document.body && GLOBALS.isDefined(document.body.scrollTop)){return document.body.scrollTop;}return null;}, getViewportHeight:function(){if (!window.opera && document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {return document.documentElement.clientHeight;}else if (document.compatMode && !window.opera && document.body) {return document.body.clientHeight;}return GLOBALS.zero(self.innerHeight);}, getViewportWidth:function(){if (document.documentElement && (!document.compatMode || document.compatMode=="CSS1Compat")) {return document.documentElement.clientWidth;}else if (document.compatMode && document.body) {return document.body.clientWidth;}return GLOBALS.zero(self.innerWidth);}, init:function(){SCREEN.body=SCREEN.getBody();SCREEN.documentHeight=SCREEN.getDocumentHeight();SCREEN.documentWidth=SCREEN.getDocumentWidth();SCREEN.scrollLeft=SCREEN.getScrollLeft();SCREEN.scrollTop=SCREEN.getScrollTop();SCREEN.viewportHeight=SCREEN.getViewportHeight();SCREEN.viewportWidth=SCREEN.getViewportWidth();}};

var TABS={click:function(node){for(counter=0;counter<TABS.list.length;counter++){TABS.list[counter].className=TABS.list[counter].className.replace(/lit/,"");}node.className="lit";for(counter=0;counter<TABS.content.length;counter++){TABS.content[counter].className=TABS.content[counter].className.replace(/tab-visible/,"tab-invisible");}$.getById(node.id.replace(/tlist-/,"tab-")).className=$.getById(node.id.replace(/tlist-/,"tab-")).className.replace(/tab-invisible/,"tab-visible");}, content:null, init:function(){if($.getByClass("tabs")[0]){TABS.wrapper=$.getByClass("tabs")[0];TABS.wrapper.className=TABS.wrapper.className.replace(/ nojs/,"");var nojs=$.getByClass("nojs",TABS.wrapper);for(counter=0;counter<nojs.length;counter++)nojs[counter].className=nojs[counter].className.replace(/ nojs/,"");var jump=$.getByClass("jump",$.getByClass("tabs")[0]);for(counter=0;counter<jump.length;counter++)jump[counter].parentNode.removeChild(jump[counter]);TABS.list=$.getByTag("a",$.getByClass("tlist")[0]);for(counter=0;counter<TABS.list.length;counter++)TABS.list[counter].onclick=function(){TABS.click(this);return false;};

TABS.content=$.getByClass("tab",$.getByClass("tabs")[0]);for(counter=0;counter<TABS.content.length;counter++)TABS.content[counter].className+=" tab-invisible";tabids=TABS.init.arguments[0]?TABS.init.arguments[0]:"benefits hardware frame-color grid-options glass slats specifications search-state search-zipcode";fallbackid=tabids.split(" ")[0];codeddefault=$.getByClass("deflit",TABS.wrapper,"a");if(codeddefault[0])fallbackid=String(codeddefault[0].id).replace("tlist-","");jumpid=document.location.href.split("#")[1]?document.location.href.split("#")[1].replace(" ",""):fallbackid;jumpid=!(new RegExp(jumpid).test(tabids))?fallbackid:jumpid;$.getById("tlist-"+jumpid).className="lit";$.getById("tab-"+jumpid).className=$.getById("tab-"+jumpid).className.replace(/tab-invisible/,"tab-visible");}}, list:null, wrapper:null };

var SERVERREQUEST = {async:false, callback:null, contenttype:"", object:null, password:"", soapAction:"", username:"", valid:false, asyncBlankCallback:function(){}, clientInsert:function(args){SERVERREQUEST.init();SERVERREQUEST.data=args;SERVERREQUEST.async=true;SERVERREQUEST.callback=SERVERREQUEST.asyncBlankCallback;SERVERREQUEST.post("/_sys/receptor.asp");}, get:function(url){if(SERVERREQUEST.valid){SERVERREQUEST.object.open("GET", url, 0);SERVERREQUEST.object.send("");return SERVERREQUEST.object.responseText;}else {return "";}}, init:function(){try{SERVERREQUEST.object=new XMLHttpRequest;SERVERREQUEST.valid=true;}catch(f){var types = [ 'Microsoft.XMLHTTP', 'MSXML2.XMLHTTP.5.0', 'MSXML2.XMLHTTP.4.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP' ];for (var i = 0;i < types.length;i++) {try {SERVERREQUEST.object=new ActiveXObject(types[i]);SERVERREQUEST.valid=true;break;}catch(g){}}}}, post:function(url){if(SERVERREQUEST.valid){SERVERREQUEST.object.open("POST", url, SERVERREQUEST.async);SERVERREQUEST.object.setRequestHeader("If-Modified-Since", "Tue, 01 Jan 1980 01:00:00 GMT");SERVERREQUEST.object.setRequestHeader("Content-Type","application/x-www-form-urlencoded");SERVERREQUEST.object.send(SERVERREQUEST.data);if(!SERVERREQUEST.async){return SERVERREQUEST.object.responseText;}else {if(SERVERREQUEST.callback){SERVERREQUEST.object.onreadystatechange=SERVERREQUEST.callback;}else {SERVERREQUEST.object.onreadystatechange=SERVERREQUEST.asyncBlankCallback;}return "";}}else {return "";}}, soap:function(url){if(SERVERREQUEST.valid){if(SERVERREQUEST.username!=''&&SERVERREQUEST.password!=''){SERVERREQUEST.object.open("POST",url,0,SERVERREQUEST.username,SERVERREQUEST.password);}else {SERVERREQUEST.object.open("POST",url,0);}if(SERVERREQUEST.soapAction!=''){SERVERREQUEST.object.setRequestHeader("SOAPAction",SERVERREQUEST.soapAction);}if(SERVERREQUEST.contenttype!=''){SERVERREQUEST.object.setRequestHeader("Content-Type",SERVERREQUEST.contenttype);}SERVERREQUEST.object.send(SERVERREQUEST.data);return SERVERREQUEST.object.responseText;}else {return "";}}};

SERVERREQUEST.init();




var NAV={init:function(){if (!window.XMLHttpRequest) {var items=$.getByClass("nav-hover",$.getByClass("nav")[0]);for(counter=0;counter<items.length;counter++){items[counter].onmouseover=function(){this.className+=" hover"};

items[counter].onmouseout=function(){this.className=this.className.replace(/ hover/,"")};

}}}};

GLOBALS.addOnload(NAV.init);var ROUND={divs:function(){}, enabled:true, image:function(){var img=$.getByClass("round-img",null,"img");for(var c=0;c<img.length;c++){var div=document.createElement("div");div.className=img[c].className;div.style.cssText = "width:"+img[c].width+"px;height:"+img[c].height+"px;";var parent = img[c].parentNode;parent.insertBefore(div,img[c]);if(String(div.className).indexOf("bobblehead")>0){img[c].className="happy bobblehead";}else {img[c].className="happy bobblehead";}div.appendChild(img[c]);var ul=document.createElement("div");ul.className="ul";div.appendChild(ul);var ur=document.createElement("div");ur.className="ur";div.appendChild(ur);var ll=document.createElement("div");ll.className="ll";div.appendChild(ll);var lr=document.createElement("div");lr.className="lr";div.appendChild(lr);}}, init:function(){if(ROUND.enabled){ROUND.image();}}};

GLOBALS.addOnload(ROUND.init);var ANIM={action:function(obj,act){if(ANIM.enabled){switch(act){case "mouseover": ANIM.popup.innerHTML=obj.innerHTML;ANIM.header.style.visibility="hidden";ANIM.popup.style.display="block";break;case "mouseout": ANIM.popup.style.display="none";ANIM.header.style.visibility="visible";ANIM.popup.innerHTML="";break;}}}, enabled:true, header:null, init:function(){if($.getByClass("anim-group")[0]){ANIM.parent=$.getByClass("anim-group")[0];ANIM.header=$.getByTag("h3",ANIM.parent)[0];ANIM.popup=document.createElement("div");ANIM.popup.className="anim-popup";ANIM.popup.style.display="none";ANIM.parent.appendChild(ANIM.popup);var anim=$.getByClass("anim",ANIM.parent);for(var c=0;c<anim.length;c++){anim[c].onmouseover=function(){ANIM.action(this,"mouseover");};  

anim[c].onmouseout=function(){ANIM.action(this,"mouseout");};

}}else ANIM.enabled=false;}, parent:null, popup:null };

GLOBALS.addOnload(ANIM.init);var CAROUSEL = {inertiabase:10, timerinterval:10, init:function() {var aryWidths=new Array();var totalWidth=0;var divs = $.getByClass("carousel", document, "div");for(var i=0;i<divs.length;i++) {aryWidths=new Array();loadingDiv=$.getByClass("loading", divs[i], "div")[0];divs[i].stagewidth=parseInt( String($.getStyle($.getByClass("slides", divs[i], "div")[0],"width")).replace("px",""));divs[i].prev=$.getByClass("prev", divs[i], "a")[0];divs[i].next=$.getByClass("next", divs[i], "a")[0];divs[i].list=$.getByTag("ul", divs[i])[0];divs[i].items=$.getByTag("li", divs[i].list);totalWidth=0;for(j=0;j<divs[i].items.length;j++){imagewidth = parseInt(String($.getStyle(divs[i].items[j],"width")).replace("px",""));lipad = parseInt(String($.getStyle(divs[i].items[j],"padding-right")).replace("px","")) * 2;if(isNaN(lipad)){lipad = parseInt(String($.getStyle(divs[i].items[j],"paddingRight")).replace("px","")) * 2;}aryWidths[j]=imagewidth + lipad;divs[i].items[j].location=(totalWidth*-1);totalWidth=totalWidth+parseInt(aryWidths[j]);}divs[i].rightlock=0;prevTestWidth=0;for(j=0;j<divs[i].items.length;j++){testWidth=divs[i].items[j].location;if (totalWidth+testWidth<divs[i].stagewidth){divs[i].items[j].location=prevTestWidth;}else {prevTestWidth=testWidth;divs[i].rightlock=j;}}totalWidth=parseInt(totalWidth)+25;divs[i].rabbits=1;if(divs[i].className.indexOf('double')>0)divs[i].rabbits=2;if(divs[i].className.indexOf('triple')>0)divs[i].rabbits=3;if(divs[i].className.indexOf('quad')>0)divs[i].rabbits=4;divs[i].widths=aryWidths;divs[i].list.style['width']=String(totalWidth);divs[i].totalwidth=totalWidth;divs[i].currentlocation=0;divs[i].currentitem=0;divs[i].timer=null;divs[i].prev.div=divs[i];divs[i].next.div=divs[i];divs[i].prev.onclick=function(){CAROUSEL.slide(this.div,-1);return false;};

divs[i].next.onclick=function(){CAROUSEL.slide(this.div,1);return false;};

CAROUSEL.setdisabled(divs[i]);loadingDiv.style["display"]="none";}}, animate:function(obj,direction,targetlocation){clearInterval(obj.timer);if(direction<0){obj.currentlocation=obj.currentlocation+CAROUSEL.inertiabase;if(targetlocation>obj.currentlocation){obj.list.style["left"]=obj.currentlocation+"px";obj.timer = setInterval(function(){CAROUSEL.animate(obj,direction,targetLocation);}, CAROUSEL.timerinterval);}else {CAROUSEL.setdisabled(obj);obj.list.style["left"]=targetlocation+"px";}}else {obj.currentlocation=obj.currentlocation-CAROUSEL.inertiabase;if(targetlocation<obj.currentlocation){obj.list.style["left"]=obj.currentlocation+"px";obj.timer = setInterval(function(){CAROUSEL.animate(obj,direction,targetLocation);}, CAROUSEL.timerinterval);}else {CAROUSEL.setdisabled(obj);obj.list.style["left"]=targetlocation+"px";}}}, setdisabled:function(obj){obj.prev.className=obj.prev.className.replace(/ disabled/,"");obj.next.className=obj.next.className.replace(/ disabled/,"");if(obj.currentitem>=obj.rightlock){obj.next.className+=" disabled";}if(obj.currentitem<=0){obj.prev.className+=" disabled";}}, slide:function(obj,direction) {var bSlidable=false;if(direction>0&&obj.currentitem<obj.rightlock) bSlidable=true;if(direction<0&&obj.currentitem>0) bSlidable=true;if(bSlidable){targetitem=obj.currentitem+direction;if(targetitem>-1&&targetitem<obj.items.length){obj.currentitem=targetitem;targetLocation=obj.items[obj.currentitem].location;clearInterval(obj.timer);obj.timer = setInterval(function(){CAROUSEL.animate(obj,direction,targetLocation);}, CAROUSEL.timerinterval);}}}};

GLOBALS.addOnload(CAROUSEL.init);var CIPHER={decrypt:function(strIn){var strOut="";for(var i=1;i<strIn.length;i++){strOut+=CIPHER.shiftChar(strIn.charAt(i),((i % 25)*-1));}hexRegEx=/\.([A-Za-z0-9]{2})/;foundHex=hexRegEx.exec(strOut);while(foundHex!=null){if(foundHex[1]=="2E"){strOut=strOut.replace(foundHex[0],"%%dotx%%");}else{strOut=strOut.replace(foundHex[0],String.fromCharCode(parseInt(foundHex[1],16)));}foundHex=hexRegEx.exec(strOut);}strOut=strOut.replace(/%%dotx%%/g,".");return strOut;}, shiftChar:function(charIn,count){var decCode=charIn.charCodeAt(0);var resCode=decCode+count;if(decCode>=65&&decCode<=90){if(resCode>90)resCode=resCode-26;if(resCode<65)resCode=resCode+26;}else if(decCode>=97&&decCode<=122){if(resCode>122)resCode=resCode-26;if(resCode<97)resCode=resCode+26;}else resCode=decCode;return String.fromCharCode(resCode);}, init:function(){cipherObject=$.getByClass("cipher");for(cipherCounter=0;cipherCounter<cipherObject.length;cipherCounter++){cipherObject[cipherCounter].innerHTML=CIPHER.decrypt(cipherObject[cipherCounter].id);}}};

GLOBALS.addOnload(CIPHER.init);var SLIDEY = {globalScope:new Array(), inertiabase:1, inertiainc:10, timerinterval:50, init:function(){var divs = $.getByClass("slidey", document, "div");for(var i=0;i<divs.length;i++) {divs[i].style['display']="none";slideyBlock=$.getByClass("slideyBlock", divs[i], "div")[0];slideyHandle=$.getByClass("slideyHandle", divs[i], "a")[0];divs[i].slideyBlock=slideyBlock;divs[i].slideyHandle=slideyHandle;divs[i].timer=null;slideyBlock.slidey=divs[i];slideyHandle.slidey=divs[i];divs[i].blockHeight=SLIDEY.getIntStyle(divs[i],"height");divs[i].blockWidth=SLIDEY.getIntStyle(divs[i],"width");divs[i].closedClass=divs[i].className;divs[i].openClass=divs[i].className+" open";slideyBlock.direction="in";divs[i].style['overflow']='hidden';slideyBlock.style['height']=divs[i].blockHeight+"px";slideyBlock.style['width']=divs[i].blockWidth+"px";slideyBlock.style['position']='absolute';slideyHandle.style['position']='absolute';divClass=String(divs[i].className);divs[i].trackClicks=0;trackFlag=divClass.indexOf('track');if (trackFlag>=0){tableNameStart=divClass.indexOf(' ',trackFlag+1);if(tableNameStart>=0){tableNameEnd=divClass.indexOf(' ',tableNameStart+1);if(tableNameEnd<0)tableNameEnd=divClass.length;divs[i].trackClicks=1;divs[i].trackClicksTable=divClass.substring(tableNameStart,tableNameEnd);}}if (divClass.indexOf('anchortop')>=0||divClass.indexOf('anchorbottom')>=0){divs[i].stretchAttrib="height";slideyHandle.height=SLIDEY.getIntStyle(slideyHandle,"height");if (isNaN(slideyHandle.height))slideyHandle.height=20;slideyHandle.width=divs[i].blockWidth;slideyHandle.length=slideyHandle.height;divs[i].minLock=(slideyHandle.length);divs[i].maxLock=(divs[i].blockHeight);divs[i].style['height']=slideyHandle.height+"px";}else {divs[i].stretchAttrib="width";slideyHandle.height=divs[i].blockHeight;slideyHandle.width=SLIDEY.getIntStyle(slideyHandle,"width");if (isNaN(slideyHandle.width))slideyHandle.width=20;slideyHandle.length=slideyHandle.width;divs[i].minLock=(slideyHandle.length);divs[i].maxLock=(divs[i].blockWidth);divs[i].style['width']=slideyHandle.width+"px";}divs[i].currentPosition=parseInt(divs[i].minLock);slideyHandle.style['height']=slideyHandle.height+"px";slideyHandle.style['width']=slideyHandle.width+"px";if (divClass.indexOf('anchorbottom')>=0){slideyBlock.style['bottom']='auto';slideyBlock.style['top']=0+"px";slideyHandle.style['bottom']='auto';slideyHandle.style['top']=0;}else if (divClass.indexOf('anchortop')>=0){slideyBlock.style['top']='auto';slideyBlock.style['bottom']=0+"px";slideyHandle.style['top']='auto';slideyHandle.style['bottom']=0;}else if (divClass.indexOf('anchorright')>=0){slideyBlock.style['right']="auto";slideyBlock.style['left']=0+"px";slideyHandle.style['right']='auto';slideyHandle.style['left']=0;}else {slideyBlock.style['left']="auto";slideyBlock.style['right']=0+"px";slideyHandle.style['left']='auto';slideyHandle.style['right']=0;}slideyHandle.onclick=function(){SLIDEY.toggle(this.slidey);return false;};

divs[i].style['display']="block";}}, getIntStyle:function(elem,attrib){return parseInt($.getStyle(elem,attrib).replace(/px/,''));}, slideClosed:function(elem){if(elem.currentPosition > elem.minLock) {elem.currentPosition -= parseInt(elem.inertiaCurrent);elem.inertiaCurrent += parseInt(SLIDEY.inertiainc);elem.style[elem.stretchAttrib] = (elem.currentPosition > elem.minLock) ? elem.currentPosition + "px" : elem.minLock + "px";}else {clearInterval(elem.timer);elem.currentPosition = elem.minLock;elem.style[elem.stretchAttrib] = elem.minLock+"px";}}, slideOpen:function(elem){if(elem.currentPosition < elem.maxLock) {elem.currentPosition += parseInt(elem.inertiaCurrent);elem.inertiaCurrent += parseInt(SLIDEY.inertiainc);elem.style[elem.stretchAttrib] = (elem.currentPosition < elem.maxLock) ? elem.currentPosition + "px" : elem.maxLock + "px";}else {clearInterval(elem.timer);elem.currentPosition = elem.maxLock;elem.style[elem.stretchAttrib] = elem.maxLock+"px";}}, sparkle:function(){}, toggle:function(elem){clearInterval(elem.timer);elem.inertiaCurrent=parseInt(SLIDEY.inertiabase);elem.currentPosition=SLIDEY.getIntStyle(elem,elem.stretchAttrib);if(elem.currentPosition > elem.minLock) {elem.className=elem.closedClass;elem.slideyBlock.direction == "out";elem.timer= setInterval(function(){SLIDEY.slideClosed(elem);}, SLIDEY.timerinterval);}else {if(elem.trackClicks>0&&String(elem.trackClicksTable).length>0){SERVERREQUEST.clientInsert('tbl='+elem.trackClicksTable+'&server='+MMIPAGE.server+'&pageview='+MMIPAGE.snack+'&pageid='+MMIPAGE.id+'&pageiastructureid='+MMIPAGE.iastructureid+'&pageurl='+MMIPAGE.url+'&trackdate=NOW()');}elem.className=elem.openClass;elem.slideyBlock.direction == "in";elem.timer= setInterval(function(){SLIDEY.slideOpen(elem);}, SLIDEY.timerinterval);}}};

GLOBALS.addOnload(SLIDEY.init);var SPLURT={anchors:null, background:null, backgroundId:"splurtBackground", baseHeight:0, baseWidth:0, buttonClose:null, buttonCloseId:"splurtCloseLink", buttonNext:null, buttonNextId:"splurtNextLink", buttonPrev:null, buttonPrevId:"splurtPrevLink", caption:null, captionId:"splurtCaption", carousel:null, carouselNum:0, carouselImages:[], controls:false, corners:{"tl":null,"tr":null,"bl":null,"br":null}, footer:null, footerId:"splurtFooter", gutters:{"h":5,"v":5}, content:null, contentId:"splurtContent", imageHeight:0, imageWidth:0, loading:null, loadingId:"splurtLoading", shadow:null, shadowId:"splurtShadow", stage:null, stageId:"splurtStage", stageclick:null, titlebar:null, titlebarId:"splurtTitleBar", window:null, windowId:"splurtWindow", maxHeight:800, maxWidth:1050, top:10, left:10, width:568, height:360, changeImage:function(iNum){var imgPreloader=new Image();imgPreloader.onload=function() {bNeedScrollers = false;imgPreloader.onload=null;imageWidth=this.width;imageHeight=this.height;SPLURT.baseHeight=imageHeight;SPLURT.baseWidth=imageWidth;SPLURT.content.src=SPLURT.carouselImages[iNum].image;SPLURT.content.alt=SPLURT.carouselImages[iNum].title;caption="<em>("+(iNum+1)+" of "+SPLURT.carouselImages.length+")</em> "+SPLURT.carouselImages[iNum].title;SPLURT.caption.innerHTML=caption;SPLURT.carouselNum=iNum;GLOBALS.removeElement(SPLURT.loading);SPLURT.loading=null;imgPreloader=null;};

imgPreloader.src=SPLURT.carouselImages[iNum].image;}, createLayers:function(mode){if(!mode)mode="normal";if (!$.getById(SPLURT.backgroundId)){SPLURT.background=GLOBALS.addElement(document.body,"div",{"id":SPLURT.backgroundId});SPLURT.shadow=GLOBALS.addElement(document.body,"div",{"id":SPLURT.shadowId});SPLURT.window=GLOBALS.addElement(document.body,"div",{"id":SPLURT.windowId});SPLURT.loading=GLOBALS.addElement(document.body,"div",{"id":SPLURT.loadingId});GLOBALS.addElement( SPLURT.loading,"img",{"src":"/_img/shared/splurt-loading.gif"});SPLURT.loading.style["display"]="block";SPLURT.background.style["display"]="block";SPLURT.window.style["left"]="-9000px";if(mode){SPLURT.window.className=mode;}SPLURT.window.style["display"]="block";SPLURT.shadow.style["display"]="none";SPLURT.background.onclick=function(){try{SPLURT.background.onclick=null;return SPLURT.remove();}catch(e){}};

window.onscroll=function(){SPLURT.position();};

SPLURT.titlebar=GLOBALS.addElement(SPLURT.window,"div",{"id":SPLURT.titlebarId});SPLURT.buttonPrev=GLOBALS.addElement(SPLURT.titlebar,"a",{"id":SPLURT.buttonPrevId});SPLURT.buttonNext=GLOBALS.addElement(SPLURT.titlebar,"a",{"id":SPLURT.buttonNextId});SPLURT.caption=GLOBALS.addElement(SPLURT.titlebar,"h4",{"id":SPLURT.captionId});SPLURT.stage=GLOBALS.addElement(SPLURT.window,"div",{"id":SPLURT.stageId});SPLURT.footer=GLOBALS.addElement(SPLURT.window,"div",{"id":SPLURT.footerId});SPLURT.buttonClose=GLOBALS.addElement(SPLURT.titlebar,"a",{"id":SPLURT.buttonCloseId});SPLURT.buttonClose.innerHTML="Close Window";SPLURT.buttonClose.onclick=function(){try{SPLURT.buttonClose.onclick=null;return SPLURT.remove();}catch(e){}};

var calcWinHeight=String(SPLURT.window.offsetHeight).replace(/px/i,"");var calcStageHeight=String(SPLURT.stage.offsetHeight).replace(/px/i,"");if(!isNaN(calcWinHeight)&&!isNaN(calcStageHeight)){SPLURT.gutters.v=parseInt(calcWinHeight)-parseInt(calcStageHeight);}else {SPLURT.gutters.v=0;}var calcWinWidth=String(SPLURT.window.offsetWidth).replace(/px/i,"");var calcStageWidth=String(SPLURT.stage.offsetWidth).replace(/px/i,"");if(!isNaN(calcWinWidth)&&!isNaN(calcStageWidth)){SPLURT.gutters.h=parseInt(calcWinWidth)-parseInt(calcStageWidth);}else {SPLURT.gutters.h=0;}if(mode.indexOf("controls")>=0){SPLURT.buttonNext.innerHTML="Next";SPLURT.buttonPrev.innerHTML="Previous";SPLURT.buttonNext.onclick=function(){return SPLURT.moveNext();};

SPLURT.buttonPrev.onclick=function(){return SPLURT.movePrev();};

}SPLURT.shadow.style["display"]="none";window.onresize=function(){SPLURT.position();};

}}, init:function(){SPLURT.anchors=$.getByClass("splurt",null,"a");for(var counter=0;counter<SPLURT.anchors.length;counter++){SPLURT.anchors[counter].viewlargerDescription = SPLURT.anchors[counter].title;SPLURT.anchors[counter].title = "click to view larger";SPLURT.anchors[counter].onclick=function(){this.blur();SPLURT.show(this.viewlargerDescription,this.href);return false;};

}}, loadJson:function(id){try{var jsonData=SERVERREQUEST.get("/_json/carousel/"+id+".js");}catch(e){jsonData="[];";}SPLURT.carouselImages=eval(jsonData);if(!SPLURT.carouselImages)SPLURT.carouselImages=[];}, loadPosition:function(){SPLURT.overlaySize();with(SPLURT.loading.style){left=(SCREEN.getScrollLeft()+(SCREEN.getViewportWidth()-100)/2)+"px";top=(SCREEN.getScrollTop()+((SCREEN.getViewportHeight()-100)/2))+"px";display="block";}}, moveNext:function(){SPLURT.loading=GLOBALS.addElement(document.body,"div",{"id":SPLURT.loadingId,"style":"display:none;"});SPLURT.loadPosition();var targetNum=SPLURT.carouselNum;targetNum++;if(targetNum>=SPLURT.carouselImages.length){targetNum=0;}SPLURT.changeImage(targetNum);}, movePrev:function(){SPLURT.loading=GLOBALS.addElement(document.body,"div",{"id":SPLURT.loadingId,"style":"display:none;"});SPLURT.loadPosition();var targetNum=SPLURT.carouselNum;targetNum=targetNum-1;if(targetNum<0){targetNum=SPLURT.carouselImages.length-1;}SPLURT.changeImage(targetNum);}, overlaySize:function(){SPLURT.background.style.height=SCREEN.getDocumentHeight()+"px";SPLURT.background.style.width=SCREEN.getDocumentWidth()+"px";}, position:function(){SPLURT.overlaySize();var bNeedScrollers=false;var vpWidth=SCREEN.getViewportWidth();var vpHeight=SCREEN.getViewportHeight();SPLURT.maxWidth=vpWidth-(SPLURT.gutters.h+0);SPLURT.maxHeight=vpHeight-(SPLURT.gutters.v+0);SPLURT.setHeight(SPLURT.baseHeight);SPLURT.setWidth(SPLURT.baseWidth);if(parseInt(SPLURT.width)>parseInt(SPLURT.maxWidth)){SPLURT.setWidth(SPLURT.maxWidth);bNeedScrollers=true;}if(parseInt(SPLURT.height)>parseInt(SPLURT.maxHeight)){SPLURT.setHeight(SPLURT.maxHeight);bNeedScrollers=true;}if(bNeedScrollers){SPLURT.stage.style["overflow"]="scroll";}else {SPLURT.stage.style["overflow"]="visible";}SPLURT.left=(SCREEN.getScrollLeft()+((vpWidth-(SPLURT.width+SPLURT.gutters.h))/2));SPLURT.top=(SCREEN.getScrollTop()+((vpHeight-(SPLURT.height+SPLURT.gutters.v))/2));with(SPLURT.window){style.top=SPLURT.top+"px";style.left=SPLURT.left+"px";}with(SPLURT.shadow){style.top=(SPLURT.top+10)+"px";style.left=(SPLURT.left+10)+"px";}}, remove:function(){try{with(window){if (window.onresize) window.onresize=null;if (window.onscroll) window.onscroll=null;};

}catch(e){}if (SPLURT.background){SPLURT.background.onclick=null;GLOBALS.removeElement(SPLURT.background);SPLURT.background=null;}if (SPLURT.buttonClose){SPLURT.buttonClose.onclick=null;GLOBALS.removeElement(SPLURT.buttonClose);SPLURT.buttonClose=null;}if (SPLURT.footer){GLOBALS.removeElement(SPLURT.footer);SPLURT.footer=null;}if (SPLURT.image){GLOBALS.removeElement(SPLURT.image);SPLURT.image=null;}if (SPLURT.content){SPLURT.content.onclick=null;GLOBALS.removeElement(SPLURT.content);SPLURT.content=null;}if (SPLURT.stageclick){SPLURT.stageclick.onclick=null;GLOBALS.removeElement(SPLURT.stageclick);SPLURT.stageclick=null;}if (SPLURT.stage){SPLURT.stage.onclick=null;GLOBALS.removeElement(SPLURT.stage);SPLURT.stage=null;}if (SPLURT.buttonPrev){SPLURT.buttonPrev.onclick=null;GLOBALS.removeElement(SPLURT.buttonPrev);SPLURT.buttonPrev=null;}if (SPLURT.buttonNext){SPLURT.buttonNext.onclick=null;GLOBALS.removeElement(SPLURT.buttonNext);SPLURT.buttonNext=null;}if (SPLURT.caption){GLOBALS.removeElement(SPLURT.caption);SPLURT.caption=null;}if (SPLURT.titlebar){GLOBALS.removeElement(SPLURT.titlebar);SPLURT.titlebar=null;}if (SPLURT.background){SPLURT.background.onclick=null;GLOBALS.removeElement(SPLURT.background);SPLURT.background=null;}if (SPLURT.shadow){GLOBALS.removeElement(SPLURT.shadow);SPLURT.shadow=null;}if (SPLURT.window){GLOBALS.removeElement(SPLURT.window);SPLURT.window=null;}if (SPLURT.loading){GLOBALS.removeElement(SPLURT.loading);SPLURT.loading=null;}return false;}, setHeight:function(ht){SPLURT.height=ht;SPLURT.stage.style["height"]=ht+"px";SPLURT.shadow.style["height"]=(ht+SPLURT.gutters.v)+"px";}, setWidth:function(wd){SPLURT.width=wd;SPLURT.stage.style["width"]=wd+"px";SPLURT.shadow.style["width"]=(wd+SPLURT.gutters.h)+"px";SPLURT.titlebar.style["width"]=wd+"px";SPLURT.footer.style["width"]=wd+"px";}, show:function(caption,url){var queryString = url.replace(/^[^\?]+\??/,'');var bCloseOnClick=false;var params = GLOBALS.parseQueryString( queryString );if(params['c']){SPLURT.carousel=params['c'];SPLURT.loadJson(params['c']);SPLURT.carouselNum=0;if(params['p']){if(!isNaN(params['p'])){SPLURT.carouselNum=parseInt(params['p']);}}}var mode="normal";if (params['mode']){mode=params['mode'];}else if(caption==""){mode="headless";}if(SPLURT.carouselImages.length>0){mode+=" controls";}SPLURT.createLayers(mode);var urlString = /\.jpg|\.jpeg|\.png|\.gif|\.bmp/g;var urlType = url.toLowerCase().match(urlString);if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){imgPreloader=new Image();bCloseOnClick=true;imgPreloader.onload=function() {bNeedScrollers = false;imgPreloader.onload=null;imageWidth=this.width;imageHeight=this.height;SPLURT.baseHeight=imageHeight;SPLURT.baseWidth=imageWidth;SPLURT.content=GLOBALS.addElement(SPLURT.stage,"img", {"id":SPLURT.contentId, "src":url, "width":imageWidth,"height":imageHeight,"alt":caption});SPLURT.corners.tl=GLOBALS.addElement(SPLURT.stage,"div",{"class":"tl"});SPLURT.corners.tr=GLOBALS.addElement(SPLURT.stage,"div",{"class":"tr"});SPLURT.corners.bl=GLOBALS.addElement(SPLURT.stage,"div",{"class":"bl"});SPLURT.corners.br=GLOBALS.addElement(SPLURT.stage,"div",{"class":"br"});if(SPLURT.carouselImages.length>0){caption="<em>("+(SPLURT.carouselNum+1)+" of "+SPLURT.carouselImages.length+")</em> "+caption;}SPLURT.caption.innerHTML=caption;SPLURT.position();SPLURT.window.style['display']="block";SPLURT.shadow.style['display']="block";GLOBALS.removeElement(SPLURT.loading);SPLURT.loading=null;imgPreloader=null;};

imgPreloader.src=url;}else {SPLURT.baseWidth = (params['width']*1) + 30 || 572;SPLURT.baseHeight = (params['height']*1) + 40 || 298;var scrollParam="no";if (params['scroll']=="yes"){scrollParam="yes";}else {SPLURT.stage.className="noborder";}SPLURT.width = SPLURT.baseWidth - 5;SPLURT.height = SPLURT.baseHeight - 45;SPLURT.content=GLOBALS.addElement(SPLURT.stage,"iframe",{"id":SPLURT.content,"src":url,"frameBorder":"0","scrolling":scrollParam});SPLURT.content.style['width']=SPLURT.baseWidth + "px";SPLURT.content.style['height']=SPLURT.baseHeight + "px";SPLURT.position();SPLURT.window.style['display']="block";SPLURT.shadow.style['display']="block";GLOBALS.removeElement(SPLURT.loading);SPLURT.loading=null;}if (params['clickclose']){bCloseOnClick=params['clickclose'];}if(bCloseOnClick){SPLURT.stageclick=GLOBALS.addElement(SPLURT.stage,"div",{"id":"splurtStageClick","style":"background-color:transparent;display:block;height:100%;position:absolute;top:0;width:100%;"});SPLURT.stageclick.onclick=function(){try{SPLURT.stageclick.onclick=null;return SPLURT.remove();}catch(e){}};

}}};

GLOBALS.addOnload(SPLURT.init);var BOBBLEHEAD={anchors:null, defaultOn:true, defaultSrc:null, header:null, init:function(){var hdr=$.getByClass("bobblehead",null,"img");if(GLOBALS.isDefined(hdr)&&GLOBALS.isArray(hdr)&&hdr.length>0){BOBBLEHEAD.header=hdr[0];BOBBLEHEAD.defaultSrc=String(hdr[0].src);BOBBLEHEAD.imageDir="";var aryPath=BOBBLEHEAD.defaultSrc.split("/");if(aryPath.length>2){for(var pb=0;pb<(aryPath.length-1);pb++){if(BOBBLEHEAD.imageDir.length>0)BOBBLEHEAD.imageDir+="/";BOBBLEHEAD.imageDir+=aryPath[pb];}}BOBBLEHEAD.imageDir+="/";BOBBLEHEAD.anchors=$.getByClass("bobblespring",null);for(var i=0;i<BOBBLEHEAD.anchors.length;i++){BOBBLEHEAD.anchors[i].offSrc=BOBBLEHEAD.defaultSrc;BOBBLEHEAD.anchors[i].onSrc=null;BOBBLEHEAD.anchors[i].active=false;BOBBLEHEAD.anchors[i].imageLoader=new Image();BOBBLEHEAD.anchors[i].imageLoader.anchor=BOBBLEHEAD.anchors[i];BOBBLEHEAD.anchors[i].imageLoader.onload=function(){this.anchor.onSrc=this.src;this.anchor.active=true;};

BOBBLEHEAD.anchors[i].imageLoader.src=BOBBLEHEAD.imageDir+BOBBLEHEAD.anchors[i].id+".jpg";BOBBLEHEAD.anchors[i].onmouseover=function(e){if(this.active){BOBBLEHEAD.defaultOn=false;BOBBLEHEAD.header.src=this.onSrc;}};

BOBBLEHEAD.anchors[i].onmouseout=function(e){if(this.active){BOBBLEHEAD.defaultOn=true;this.timer=setTimeout(function(){BOBBLEHEAD.reset();},2000);}};

}}}, reset:function(){if(BOBBLEHEAD.defaultOn){BOBBLEHEAD.header.src=BOBBLEHEAD.defaultSrc;}}};

GLOBALS.addOnload(BOBBLEHEAD.init);var TARGET={currentDomain:"", checkDomain:function(href){var domRegEx=new RegExp("^https?\:\/\/([^\/]*)","ig");var retVal=domRegEx.exec(href);if(retVal&&(retVal[1].indexOf(".milgard.")<0||retVal[1].indexOf("dealer.")>=0)){return true;}return false;}, checkExtension:function(href){var extRegEx=new RegExp("\.pdf$","ig");return extRegEx.test(href);}, init:function(){TARGET.currentDomain=document.domain;var anchors=$.getByTag("a");for(var counter=0;counter<anchors.length;counter++){var chkHref=String(anchors[counter].getAttribute("href"));if(TARGET.checkDomain(chkHref)||TARGET.checkExtension(chkHref)){anchors[counter].target="_ext";}}}};

GLOBALS.addOnload(TARGET.init);BOOKMARK={init:function(){$.getByTag("h1")[0].innerHTML+=' '+BOOKMARK.markup;}, markup:"<a href=\"http://www.addthis.com/bookmark.php\" onmouseOver=\"return addthis_open(this, '', '[URL]', 'Alternate Title')\" onmouseOut=\"addthis_close()\" onclick=\"return addthis_sendto()\" class=\"addthis\"><img src=\"/_img/shared/addthis.gif\" alt=\"Add This Bookmark\" /> <span>share</span></a><style>#at20mc {position:absolute !important;widSth:960px !important;}</style>" };

BOOKMARK.init();var CLICKTRACK={cookie:function(id){document.cookie="clicktrack="+id+";path=/;domain="+CLICKTRACK.domain;}, domain:(/.thinkhmh./.test(String(document.location.href)))?"milgard.thinkhmh.com":"milgard.com", init:function(){CLICKTRACK.cookie('');var items=$.getByClass("clicktrack");for(var counter=0;counter<items.length;counter++){items[counter].prevonclick=items[counter].onclick;items[counter].onclick=function(){CLICKTRACK.cookie(this.id);return this.prevonclick?this.prevonclick():true;};

}}};

GLOBALS.addOnload(CLICKTRACK.init);var BAA={init:function(){if($.getByClass("baa-stage").length){BAA.units=$.getByClass("baa-unit");for(c=0;c<BAA.units.length;c++){/showing/.test(BAA.units[c].className)?BAA.selected=BAA.units[c]:0;h2=$.getByTag("h2",BAA.units[c])[0];/showing/.test(BAA.units[c].className)?0:h2.className="dull";h2.onmouseover=function(){this.className=this.className.replace(/dull/,"glowing")};

h2.onmouseout=function(){this.className=this.className.replace(/glowing/,"dull")};

h2.onclick=function(){BAA.chooserclick(this.parentNode)};

h3=$.getByTag("h3",BAA.units[c]);for(cc=0;cc<2;cc++){h3[cc].onmouseover=function(){BAA.batoggle(this)};

h3[cc].onmouseout=function(){this.className=this.className.replace(/ glowing/,"")};

}}}}, batoggle:function(h3){unit=h3.parentNode.parentNode.parentNode;before=$.getByClass("before",unit)[0];after=$.getByClass("after",unit)[0];if(/before/.test(h3.className)){before.className="before glowing";before.parentNode.className="front";after.parentNode.className="back";}if(/after/.test(h3.className)){after.className="after glowing";after.parentNode.className="front";before.parentNode.className="back";}}, chooserclick:function(unit){BAA.selected.className="baa-unit hiding";$.getByTag("h2",BAA.selected)[0].className="dull";before=$.getByClass("before",BAA.selected)[0];before.parentNode.className="back";after=$.getByClass("after",BAA.selected)[0];after.parentNode.className="front";unit.className="baa-unit showing";$.getByTag("h2",unit)[0].className="hot";BAA.selected=unit;}, selected:null, units:null };

GLOBALS.addOnload(BAA.init);var SWAPPIE={init:function(){if($.getByClass("swappie").length){SWAPPIE.items=$.getByTag("li",$.getByTag("ul",$.getByClass("swappie")[0])[0]);SWAPPIE.length=SWAPPIE.items.length;if(SWAPPIE.length>0){for(c=0;c<SWAPPIE.length;c++)if(SWAPPIE.items[c].className=="shown")SWAPPIE.shown=c;window.setTimeout("SWAPPIE.timer('hide')",SWAPPIE.interval);}}}, interval:10000, items:null, length:-1, pause:500, shown:-1, timer:function(swaptype){switch(swaptype){case "hide": SWAPPIE.items[SWAPPIE.shown].className="hide";window.setTimeout("SWAPPIE.timer('show')",SWAPPIE.pause);break;case "show": SWAPPIE.shown=(SWAPPIE.shown==SWAPPIE.length-1)?0:SWAPPIE.shown+1;SWAPPIE.items[SWAPPIE.shown].className="shown";window.setTimeout("SWAPPIE.timer('hide')",SWAPPIE.interval);}}};

GLOBALS.addOnload(SWAPPIE.init);