var tb_pathToImage="//v3.alltecstores.com/themes/images/loadingAnimation.gif";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage;});function tb_init(domChunk){$(domChunk).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false;});}
function tb_show(caption,url,imageGroup){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}else{if(document.getElementById("TB_overlay")===null){$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove);}}
if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay").addClass("TB_overlayBG");}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$('#TB_load').show();var baseURL;if(url.indexOf("?")!==-1){baseURL=url.substr(0,url.indexOf("?"));}else{baseURL=url;}
var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(imageGroup){TB_TempArray=$("a[rel="+imageGroup+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>  <a href='#'>Next ></a></span>";}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>  <a href='#'>< Prev</a></span>";}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length);}}}
imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var pagesize=tb_getPageSize();var x=pagesize[0]-150;var y=pagesize[1]-150;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}
TB_WIDTH=imageWidth+30;TB_HEIGHT=imageHeight+60;$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>"+"<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>Close Window</a></div>");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}
$("#TB_prev").click(goPrev);}
if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}
$("#TB_next").click(goNext);}
document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext();}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev();}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"});};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||630;TB_HEIGHT=(params['height']*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$("#TB_iframeContent").remove();if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>Close Window</a></div></div><iframe allowtransparency='true' frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>");}}else{if($("#TB_window").css("display")!="block"){if(params['modal']!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>Close Window</a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(caption);}}
$("#TB_closeWindowButton").click(tb_remove);if(url.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+params['inlineId']).children());$("#TB_window").unload(function(){$('#'+params['inlineId']).append($("#TB_ajaxContent").children());});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"});}}else{$("#TB_ajaxContent").load(url+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"});});}}
if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){tb_remove();}};}}catch(e){}}
function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"});}
function tb_remove(){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","");}
document.onkeydown="";document.onkeyup="";return false;}
function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}}
function tb_parseQuery(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;}
function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}
function tb_detectMacXFF(){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}
function getCookie(c_name)
{var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i<ARRcookies.length;i++)
{x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name)
{return unescape(y);}}}
function ajax_compare(action,itemid,ipaddress){try
{xmlhttp=new XMLHttpRequest();}
catch(e)
{try
{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{return false;}}}
xmlhttpStr="/ajaxhandler.ashx?action="+escape(action)+"&itemid="+escape(itemid)+"&ipaddress="+getCookie("SessionId");xmlhttp.open("POST",xmlhttpStr,true);xmlhttp.send();xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState==4&&xmlhttp.status==200&&document.location.protocol!='https:'){document.getElementById('compareBucket').style.display='';document.getElementById('compareBucket').innerHTML=xmlhttp.responseText;if(action=='popCompare'){itemToShow='#btnCompare'+itemid;$(itemToShow).show("fast",null);}
else if(action=='clearCompare'){$('.btnCompare').show("fast",null);}
else{$('.txtCompareList').each(function(index){divToHide="#"+$(this).text();$(divToHide).hide();});}
if(unescape(document.URL).indexOf('|')>0&&xmlhttp.responseText.length<=200)
{for(x=0;x<100;x++){try{document.getElementById('removeLink'+x).style.display='none';}
catch(e){break;}}}
if(action=='popCompare'||action=='clearCompare')
{if(document.location.href.indexOf('compare_items.html')>0)
{window.location=document.getElementById('compareNowLink').href;}}}};return;}
function moveMeUp(x){var p=$("#compareBucket:first");var position=p.position();var objPosition=$(x).position();$(x).animate({"left":("-="+(objPosition.left-position.left))},{queue:true,duration:100});$(x).animate({"top":("-="+(objPosition.top-position.top))},{queue:true,duration:100})
$(x).hide("fast",function(){$(x).hide({queue:true});$(x).animate({"left":("+="+(objPosition.left-position.left))},{queue:true,duration:1});$(x).animate({"top":("+="+(objPosition.top-position.top))},{queue:true,duration:1})});return;}
var dw_Event={add:function(obj,etype,fp,cap){cap=cap||false;if(obj.addEventListener)obj.addEventListener(etype,fp,cap);else if(obj.attachEvent)obj.attachEvent("on"+etype,fp);},remove:function(obj,etype,fp,cap){cap=cap||false;if(obj.removeEventListener)obj.removeEventListener(etype,fp,cap);else if(obj.detachEvent)obj.detachEvent("on"+etype,fp);},DOMit:function(e){e=e?e:window.event;if(!e.target)e.target=e.srcElement;if(!e.preventDefault)e.preventDefault=function(){e.returnValue=false;return false;}
if(!e.stopPropagation)e.stopPropagation=function(){e.cancelBubble=true;}
return e;},getTarget:function(e){e=dw_Event.DOMit(e);var tgt=e.target;if(tgt.nodeType!=1)tgt=tgt.parentNode;return tgt;}}
var dw_Viewport={getWinWidth:function(){this.width=0;if(window.innerWidth)
this.width=window.innerWidth-18;else if(document.documentElement&&document.documentElement.clientWidth)
this.width=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)
this.width=document.body.clientWidth;return this.width;},getWinHeight:function(){this.height=0;if(window.innerHeight)
this.height=window.innerHeight-18;else if(document.documentElement&&document.documentElement.clientHeight)
this.height=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)
this.height=document.body.clientHeight;return this.height;},getScrollX:function(){this.scrollX=0;if(typeof window.pageXOffset=="number")
this.scrollX=window.pageXOffset;else if(document.documentElement&&document.documentElement.scrollLeft)
this.scrollX=document.documentElement.scrollLeft;else if(document.body&&document.body.scrollLeft)
this.scrollX=document.body.scrollLeft;else if(window.scrollX)
this.scrollX=window.scrollX;return this.scrollX;},getScrollY:function(){this.scrollY=0;if(typeof window.pageYOffset=="number")
this.scrollY=window.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)
this.scrollY=document.documentElement.scrollTop;else if(document.body&&document.body.scrollTop)
this.scrollY=document.body.scrollTop;else if(window.scrollY)
this.scrollY=window.scrollY;return this.scrollY;},getAll:function(){this.getWinWidth();this.getWinHeight();this.getScrollX();this.getScrollY();}}
var dw_Tooltip={offX:12,offY:12,showDelay:100,hideDelay:100,hoverDelay:500,tipID:"tipDiv",actuatorClass:"showTip",maxLoops:2,activateOnfocus:true,provideShim:false,on_show:function(){},on_position:function(){},on_hide:function(){},tip:null,shim:null,timer:0,hoverTimer:0,active:false,actuator:null,resetFlag:false,restored:true,init:function(){var _this=dw_Tooltip,el;if(_this.hasSupport()){if(!(el=document.getElementById(_this.tipID))){el=document.createElement("div");el.id=_this.tipID;document.body.appendChild(el);}
el.style.position='absolute';el.style.visibility='hidden';el.style.zIndex=10000;_this.tip=document.getElementById(_this.tipID);if(_this.checkOverlaySupport()){_this.prepOverlay();}
_this.setDefaults();_this.setPosition(0,0);}},hasSupport:function(){if(document.createElement&&document.getElementsByTagName&&(document.addEventListener||document.attachEvent)){return true;}
return false;},setDefaults:function(){if(!this.defaultProps)this.defaultProps={};var list=this.props_list;for(var i=0;list[i];i++){this[list[i][0]]=(typeof this.defaultProps[list[i][0]]==list[i][1])?this.defaultProps[list[i][0]]:list[i][2];}
this.tip.className=this.klass;this.coordinateOptions();},activate:function(e,tgt,msg,id){var _this=dw_Tooltip;if(!_this.tip)return;_this.clearTimer('timer');_this.clearTimer('hoverTimer');if(!_this.restored){_this.handleRestore();}
_this.actuator=tgt;dw_Viewport.getAll();_this.getContent(e,tgt,msg,id);_this.restored=false;if(!_this.tip.innerHTML)return;_this.active=true;_this.handleOptions(e);_this.positionFn(e,tgt);_this.adjust();_this.timer=setTimeout(_this.show,_this.showDelay);},getContent:function(e,tgt,msg,id){if(id&&!msg){var source=dw_Tooltip.defaultProps['content_source']||'content_vars';var obj=(this.content_vars&&this.content_vars[id])?this.content_vars[id]:false;if(typeof obj=='string'){msg=obj;}else if(typeof obj=='object'){this.checkForProps(obj);if(source=='ajax'&&!obj['static']){dw_Tooltip.initAjaxRequest(id);}
if(obj['content']){msg=obj['content'];}else if(obj['html_id']){var el=document.getElementById(obj['html_id']);if(el)msg=el.innerHTML;}else{msg=obj;}}}
this.writeTip(msg);},writeTip:function(msg){msg=this.wrapFn(msg);this.tip.innerHTML=msg;},positionRelEvent:function(e,tgt){var _this=dw_Tooltip;if(typeof e=='object'){if(e.type=='mouseover'||e.type=='mousemove'){_this.evX=_this.getMouseEventX(e);_this.evY=_this.getMouseEventY(e);}else{var pos=dw_Util.getPageOffsets(tgt);_this.evX=pos.x;_this.evY=pos.y;}}
var coords=_this.calcPosCoords(e,tgt);_this.setPosition(coords.x,coords.y);},calcPosCoords:function(e,tgt){var x=this.evX;var y=this.evY;var maxX=this.getMaxX();var maxY=this.getMaxY();var xXd,yXd;var tx=x+this.offX;var altx=x-(this.width+this.offX);var spL=x-dw_Viewport.scrollX>dw_Viewport.width/2;if(typeof e=='object'&&e.type&&(e.type=='focus'||e.type=='focusin')){var tgtWidth=tgt.offsetWidth;if(tx+tgtWidth<maxX){x=this.evX=x+tgtWidth;tx+=tgtWidth;}else if(tx+20<maxX){x=this.evX=x+20;tx+=20}
y=this.evY=y+10;}
var ty=y+this.offY;var alty=y-(this.height+this.offY);var spA=y-dw_Viewport.scrollY>dw_Viewport.height/2;if(!this.Left&&tx<maxX){x=tx;}else if((this.Left&&altx>=dw_Viewport.scrollX)||(this.jumpLeft&&tx>=maxX&&altx>=dw_Viewport.scrollX)){x=altx;}else if((this.Left&&altx<dw_Viewport.scrollX)||(!this.Left&&this.jumpLeft&&altx<dw_Viewport.scrollX&&spL)){x=dw_Viewport.scrollX;xXd='Left';}else if(!this.Left&&tx>=maxX&&(!this.jumpLeft||(this.jumpLeft&&altx<dw_Viewport.scrollX&&!spL))){x=maxX;xXd='Right';}
if(!this.Above&&ty<maxY){y=ty;}else if((this.Above&&alty>=dw_Viewport.scrollY)||(this.jumpAbove&&ty>=maxY&&alty>=dw_Viewport.scrollY)){y=alty;}else if((this.Above&&alty<dw_Viewport.scrollY)||(!this.Above&&this.jumpAbove&&alty<dw_Viewport.scrollY&&spA)){y=dw_Viewport.scrollY;yXd='Above';}else if(!this.Above&&ty>=maxY&&(!this.jumpAbove||(this.jumpAbove&&alty<dw_Viewport.scrollY&&!spA))){y=maxY;yXd='Below';}
if(xXd&&yXd){var dx=(xXd=='Left')?dw_Viewport.scrollX-altx:tx-maxX;var dy=(yXd=='Above')?dw_Viewport.scrollY-alty:ty-maxY;if(dx<=dy){x=(xXd=='Left')?altx:tx;}else{y=(yXd=='Above')?alty:ty;}}
return{x:x,y:y}},adjust:function(){var _this=dw_Tooltip;var imgs=_this.tip.getElementsByTagName('img');var img=imgs.length?imgs[imgs.length-1]:null;checkComplete();function checkComplete(){if(!_this.active)return;_this.positionFn();if(img&&!img.complete){setTimeout(checkComplete,50);}}},setPosition:function(x,y){this.tip.style.left=x+'px';this.tip.style.top=y+'px';this.setOverlay();this.on_position();},show:function(){var _this=dw_Tooltip;_this.tip.style.visibility='visible';if(_this.shim)_this.shim.style.visibility='visible';_this.on_show();},deactivate:function(e){var _this=dw_Tooltip;if(!_this.tip||!_this.active||_this.sticky)return;e=e?e:window.event;if(e.type&&e.type=='mouseout'&&!dw_Util.mouseleave(e,_this.actuator))return;_this.clearTimer('timer');_this.clearTimer('hoverTimer');if(_this.hoverable){_this.hoverTimer=setTimeout(_this.hide,_this.hoverDelay);return;}
if(_this.duration){_this.timer=setTimeout(_this.hide,_this.duration);return;}
_this.timer=setTimeout(_this.hide,_this.hideDelay);},hide:function(){var _this=dw_Tooltip;if(!_this.tip)return;_this.tip.style.visibility='hidden';if(_this.shim)_this.shim.style.visibility='hidden';_this.handleRestore();_this.on_hide();},handleOptions:function(e){this.coordinateOptions();if(this.klass){this.tip.className=this.klass;}
if(this.hoverable){this.tip.onmouseout=dw_Tooltip.tipOutCheck;this.tip.onmouseover=function(){dw_Tooltip.clearTimer('hoverTimer');}}else if(this.followMouse&&!(e.type=='focus'||e.type=='focusin')){dw_Event.add(document,'mousemove',this.positionRelEvent);}else if(this.sticky||this.duration){dw_Event.add(document,"mouseup",dw_Tooltip.checkDocClick);}},coordinateOptions:function(){if(this.sticky||this.hoverable||this.duration){this.followMouse=false;}
if(this.sticky){this.hoverable=false;this.duration=0;}
if(this.hoverable){this.duration=0;}
if(this.positionFn!=this.positionRelEvent)this.followMouse=false;},handleRestore:function(){if(this.followMouse){dw_Event.remove(document,'mousemove',this.positionRelEvent);}else if(this.sticky||this.duration){dw_Event.remove(document,"mouseup",dw_Tooltip.checkDocClick,false);}
this.tip.onmouseover=this.tip.onmouseout=function(){}
if(this.resetFlag){this.setDefaults();}
this.resetRequest();this.writeTip('');this.active=false;this.actuator=null;this.tip.style.width='';this.restored=true;},getTipClass:function(cls){if(!cls)return'';var c='';var classes=cls.split(/\s+/);for(var i=0;classes[i];i++){if(classes[i]==this.actuatorClass&&classes[i+1]){c=classes[i+1];break;}}
return c;},checkForProps:function(obj){var list=this.props_list;for(var i=0;list[i];i++){if(typeof obj[list[i][0]]!='undefined'){this[list[i][0]]=obj[list[i][0]];this.resetFlag=true;}}},tipOutCheck:function(e){var _this=dw_Tooltip;var tip=this;if(dw_Util.mouseleave(e,tip)){_this.timer=setTimeout(_this.hide,_this.hideDelay);}},checkEscKey:function(e){e=e?e:window.event;if(e.keyCode==27)dw_Tooltip.hide();},checkDocClick:function(e){if(!dw_Tooltip.active)return;var tgt=dw_Event.getTarget(e);var tip=document.getElementById(dw_Tooltip.tipID);if(tgt==tip||dw_Util.contained(tgt,tip)){if(tgt.tagName&&tgt.tagName.toLowerCase()=="img")tgt=tgt.parentNode;if(tgt.tagName.toLowerCase()!="a"||tgt.href.indexOf("dw_Tooltip.hide")!=-1)return;}
dw_Tooltip.timer=setTimeout(dw_Tooltip.hide,50);},checkOverlaySupport:function(){if(this.provideShim&&navigator.userAgent.indexOf("Windows")!=-1&&typeof document.body!="undefined"&&typeof document.body.insertAdjacentHTML!="undefined"&&!window.opera&&navigator.appVersion.indexOf("MSIE 5.0")==-1)return true;return false;},prepOverlay:function(){document.body.insertAdjacentHTML("beforeEnd",'<iframe id="tipShim" src="javascript: false" style="position:absolute; left:0; top:0; z-index:500; visibility:hidden" scrolling="no" frameborder="0"></iframe>');this.shim=document.getElementById('tipShim');if(this.shim&&this.tip){this.shim.style.width=this.tip.offsetWidth+"px";this.shim.style.height=this.tip.offsetHeight+"px";}},setOverlay:function(){if(this.shim){this.shim.style.left=this.tip.style.left;this.shim.style.top=this.tip.style.top;this.shim.style.width=this.tip.offsetWidth+"px";this.shim.style.height=this.tip.offsetHeight+"px";}},clearTimer:function(timer){if(dw_Tooltip[timer]){clearTimeout(dw_Tooltip[timer]);dw_Tooltip[timer]=0;}},initAjaxRequest:function(){},resetRequest:function(){},getWidth:function(){return this.width=this.tip.offsetWidth;},getHeight:function(){return this.height=this.tip.offsetHeight;},getMaxX:function(){return dw_Viewport.width+dw_Viewport.scrollX-this.getWidth()-1;},getMaxY:function(){return dw_Viewport.height+dw_Viewport.scrollY-this.getHeight()-1;},getMouseEventX:function(e){return e.pageX?e.pageX:e.clientX+dw_Viewport.scrollX;},getMouseEventY:function(e){return e.pageY?e.pageY:e.clientY+dw_Viewport.scrollY;}}
dw_Tooltip.props_list=[['klass','string',''],['followMouse','boolean',true],['sticky','boolean',false],['hoverable','boolean',false],['duration','number',0],['jumpAbove','boolean',true],['jumpLeft','boolean',true],['Left','boolean',false],['Above','boolean',false],['positionFn','function',dw_Tooltip.positionRelEvent],['wrapFn','function',function(str){return str;}]];dw_Tooltip.initHandlers=function(){dw_Event.add(document,'mouseover',dw_Tooltip.checkActuatorMouseover);dw_Event.add(document,"keydown",dw_Tooltip.checkEscKey,true);dw_Event.add(window,'blur',dw_Tooltip.deactivate,true);dw_Event.add(window,'unload',dw_Tooltip.deactivate,true);if(dw_Tooltip.activateOnfocus){if(window.addEventListener){dw_Event.add(document,'focus',dw_Tooltip.checkActuatorFocus,true);}else if(window.attachEvent){dw_Event.add(document,'focusin',dw_Tooltip.checkActuatorFocus);}}}
dw_Tooltip.checkActuatorMouseover=function(e){var tgt=dw_Event.getTarget(e);var tipAct=null;var ctr=0;var maxCnt=dw_Tooltip.maxLoops;do{if((tipAct=dw_Tooltip.getActuatorInfo(tgt))){var msg=tipAct.msg;var id=tipAct.id;dw_Tooltip.activate(e,tgt,msg,id);if(window.attachEvent){dw_Event.remove(tgt,'mouseout',dw_Tooltip.deactivate);}
dw_Event.add(tgt,'mouseout',dw_Tooltip.deactivate);break;}
ctr++;}while(ctr<maxCnt&&(tgt=tgt.parentNode));}
dw_Tooltip.checkActuatorFocus=function(e){var tgt=dw_Event.getTarget(e);var tipAct=null;if(tgt&&(tipAct=dw_Tooltip.getActuatorInfo(tgt))){if(dw_Tooltip.active&&tgt==dw_Tooltip.actuator){return;}
var msg=tipAct.msg;var id=tipAct.id;dw_Tooltip.activate(e,tgt,msg,id);if(window.addEventListener){dw_Event.add(tgt,'blur',dw_Tooltip.deactivate,true);}else if(window.attachEvent){dw_Event.add(tgt,'focusout',dw_Tooltip.deactivate);}}}
dw_Tooltip.getActuatorInfo=function(tgt){var cls=dw_Tooltip.getTipClass(tgt.className);if(!cls)return'';var source=dw_Tooltip.defaultProps['content_source']||'content_vars';var msg='',id='',obj;if(dw_Tooltip.content_vars){id=(dw_Tooltip.content_vars[cls])?cls:'';}
if(!id&&source=='class_id'){var el=document.getElementById(cls);if(el)msg=el.innerHTML;}
if(id||msg){return{msg:msg,id:id}}
return false;}
var dw_Util;if(!dw_Util)dw_Util={};dw_Util.mouseleave=function(e,oNode){e=dw_Event.DOMit(e);var toEl=e.relatedTarget?e.relatedTarget:e.toElement?e.toElement:null;if(oNode!=toEl&&!dw_Util.contained(toEl,oNode)){return true;}
return false;}
dw_Util.contained=function(oNode,oCont){if(!oNode)return null;while((oNode=oNode.parentNode))if(oNode==oCont)return true;return false;}
dw_Util.getPageOffsets=function(el){var left=0,top=0;do{left+=el.offsetLeft;top+=el.offsetTop;}while((el=el.offsetParent));return{x:left,y:top};}
dw_Tooltip.writeStyleRule=function(){if(dw_Tooltip.hasSupport()){document.write('<style type="text/css" media="screen">.tipContent { display:none; }</style>');}}
dw_Event.add(window,'load',dw_Tooltip.init);dw_Event.add(window,'load',dw_Tooltip.initHandlers);dw_Tooltip.positionWindowCenter=function(){var x=Math.round((dw_Viewport.width-dw_Tooltip.tip.offsetWidth)/2)+dw_Viewport.scrollX;var y=Math.round((dw_Viewport.height-dw_Tooltip.tip.offsetHeight)/2)+dw_Viewport.scrollY;dw_Tooltip.setPosition(x,y);}
dw_Tooltip.wrapSticky=function(str,title){title=title||'';var src=dw_Tooltip.defaultProps['closeBoxImage'];var msg='<table id="stickyTable" border="0" cellpadding="0" cellspacing="0" width="100%"><tr class="stickyBar">'+'<td><div class="stickyTitle">'+title+'</div></td>'+'<td style="text-align:right"><a href="javascript: void dw_Tooltip.hide()">'+'<img style="float:right" src="'+src+'" border="0" /></a></td></tr>'+'<tr><td colspan="2"><div class="stickyContent">'+str+'</div></td></tr></table>';return msg;}
dw_Tooltip.wrapToWidth=function(obj){if(!obj)return'';var str=obj['str'];var caption=obj['caption']||'';if(this.sticky&&this.defaultProps['showCloseBox']){str=dw_Tooltip.wrapSticky(str,caption);}else{if(caption){str='<div class="caption">'+obj['caption']+'</div>'+str;}}
if(obj['w'])this.setTipWidth(obj['w']);return str;}
dw_Tooltip.wrapImageToWidth=function(obj){if(!obj)return'';dw_Util.getImage(obj['img']);var caption=obj['caption']||'';var w=obj['w'];var str='<img src="'+obj['img']+'" width="'+w+'" height="'+obj['h']+'" alt="">';if(this.sticky&&this.defaultProps['showCloseBox']){str=dw_Tooltip.wrapSticky(str,caption);w+=8;}else{if(caption){str='<div class="caption">'+obj['caption']+'</div>'+str;}}
if(w)this.setTipWidth(w);return str;}
dw_Tooltip.wrapTextByImage=function(obj){if(!obj)return'';dw_Util.getImage(obj['img']);var caption=obj['caption']||'';var str='<table cellpadding="0" cellspacing="0" border="0"><tr>'+'<td><div class="txt">'+obj['txt']+'</div></td>'+'<td><div class="img"><img src="'+obj['img']+'" /></div>'+'</td></tr></table>';if(this.sticky&&this.defaultProps['showCloseBox']){str=dw_Tooltip.wrapSticky(str,caption);}else{if(caption){str='<div class="caption">'+obj['caption']+'</div>'+str;}}
if(obj['w'])this.setTipWidth(obj['w']);return str;}
dw_Tooltip.wrapImageOverText=function(obj){if(!obj)return'';dw_Util.getImage(obj['img']);var caption=obj['caption']||'';var str='<div class="img"><img src="'+obj['img']+'" /></div><div class="txt">'+obj['txt']+'</div>';if(this.sticky&&this.defaultProps['showCloseBox']){str=dw_Tooltip.wrapSticky(str,caption);}else{if(caption){str='<div class="caption">'+obj['caption']+'</div>'+str;}}
if(obj['w'])this.setTipWidth(obj['w']);return str;}
dw_Tooltip.wrapTextOverImage=function(obj){if(!obj)return'';dw_Util.getImage(obj['img']);var caption=obj['caption']||'';var str='<div class="txt">'+obj['txt']+'</div><div class="img"><img src="'+obj['img']+'" /></div>';if(this.sticky&&this.defaultProps['showCloseBox']){str=dw_Tooltip.wrapSticky(str,caption);}else{if(caption){str='<div class="caption">'+obj['caption']+'</div>'+str;}}
if(obj['w'])this.setTipWidth(obj['w']);return str;}
dw_Tooltip.setTipWidth=function(w){w=parseInt(w)+dw_Util.forBackCompatWidth(this.tip);this.tip.style.width=w+"px";}
var dw_Util;if(!dw_Util)dw_Util={};dw_Util.getImage=function(src){var img=new Image();img.src=src;}
dw_Util.forBackCompatWidth=function(el){var val=0;var getStyle=dw_Util.getCurrentStyle;if(el.currentStyle&&!window.opera&&(document.compatMode==null||document.compatMode=="BackCompat")){var pl=parseInt(dw_Util.getCurrentStyle(el,'paddingLeft'));var pr=parseInt(dw_Util.getCurrentStyle(el,'paddingRight'));var bl=parseInt(dw_Util.getCurrentStyle(el,'borderLeftWidth'));var br=parseInt(dw_Util.getCurrentStyle(el,'borderRightWidth'));val=(!isNaN(pl)?pl:0)+(!isNaN(pr)?pr:0)+(!isNaN(bl)?bl:0)+(!isNaN(br)?br:0);}
return val;}
dw_Util.getCurrentStyle=function(el,prop){var val='';if(document.defaultView&&document.defaultView.getComputedStyle){val=document.defaultView.getComputedStyle(el,null)[prop];}else if(el.currentStyle){val=el.currentStyle[prop];if(!/^\d+(px)?$/i.test(val)&&/^\d/.test(val)){var style=el.style.left;var runtimeStyle=el.runtimeStyle.left;el.runtimeStyle.left=el.currentStyle.left;el.style.left=val||0;val=el.style.pixelLeft+"px";el.style.left=style;el.runtimeStyle.left=runtimeStyle;}}
return val;}
var Spry;if(!Spry)Spry={};if(!Spry.Widget)Spry.Widget={};Spry.Widget.CollapsiblePanel=function(element,opts)
{this.element=this.getElement(element);this.focusElement=null;this.hoverClass="CollapsiblePanelTabHover";this.openClass="CollapsiblePanelOpen";this.closedClass="CollapsiblePanelClosed";this.focusedClass="CollapsiblePanelFocused";this.enableAnimation=true;this.enableKeyboardNavigation=true;this.animator=null;this.hasFocus=false;this.contentIsOpen=true;this.openPanelKeyCode=Spry.Widget.CollapsiblePanel.KEY_DOWN;this.closePanelKeyCode=Spry.Widget.CollapsiblePanel.KEY_UP;Spry.Widget.CollapsiblePanel.setOptions(this,opts);this.attachBehaviors();};Spry.Widget.CollapsiblePanel.prototype.getElement=function(ele)
{if(ele&&typeof ele=="string")
return document.getElementById(ele);return ele;};Spry.Widget.CollapsiblePanel.prototype.addClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))!=-1))
return;ele.className+=(ele.className?" ":"")+className;};Spry.Widget.CollapsiblePanel.prototype.removeClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))==-1))
return;ele.className=ele.className.replace(new RegExp("\\s*\\b"+className+"\\b","g"),"");};Spry.Widget.CollapsiblePanel.prototype.hasClassName=function(ele,className)
{if(!ele||!className||!ele.className||ele.className.search(new RegExp("\\b"+className+"\\b"))==-1)
return false;return true;};Spry.Widget.CollapsiblePanel.prototype.setDisplay=function(ele,display)
{if(ele)
ele.style.display=display;};Spry.Widget.CollapsiblePanel.setOptions=function(obj,optionsObj,ignoreUndefinedProps)
{if(!optionsObj)
return;for(var optionName in optionsObj)
{if(ignoreUndefinedProps&&optionsObj[optionName]==undefined)
continue;obj[optionName]=optionsObj[optionName];}};Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver=function(e)
{this.addClassName(this.getTab(),this.hoverClass);return false;};Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut=function(e)
{this.removeClassName(this.getTab(),this.hoverClass);return false;};Spry.Widget.CollapsiblePanel.prototype.open=function()
{this.contentIsOpen=true;if(this.enableAnimation)
{if(this.animator)
this.animator.stop();this.animator=new Spry.Widget.CollapsiblePanel.PanelAnimator(this,true,{duration:this.duration,fps:this.fps,transition:this.transition});this.animator.start();}
else
this.setDisplay(this.getContent(),"block");this.removeClassName(this.element,this.closedClass);this.addClassName(this.element,this.openClass);};Spry.Widget.CollapsiblePanel.prototype.close=function()
{this.contentIsOpen=false;if(this.enableAnimation)
{if(this.animator)
this.animator.stop();this.animator=new Spry.Widget.CollapsiblePanel.PanelAnimator(this,false,{duration:this.duration,fps:this.fps,transition:this.transition});this.animator.start();}
else
this.setDisplay(this.getContent(),"none");this.removeClassName(this.element,this.openClass);this.addClassName(this.element,this.closedClass);};Spry.Widget.CollapsiblePanel.prototype.onTabClick=function(e)
{if(this.isOpen())
this.close();else
this.open();this.focus();return this.stopPropagation(e);};Spry.Widget.CollapsiblePanel.prototype.onFocus=function(e)
{this.hasFocus=true;this.addClassName(this.element,this.focusedClass);return false;};Spry.Widget.CollapsiblePanel.prototype.onBlur=function(e)
{this.hasFocus=false;this.removeClassName(this.element,this.focusedClass);return false;};Spry.Widget.CollapsiblePanel.KEY_UP=38;Spry.Widget.CollapsiblePanel.KEY_DOWN=40;Spry.Widget.CollapsiblePanel.prototype.onKeyDown=function(e)
{var key=e.keyCode;if(!this.hasFocus||(key!=this.openPanelKeyCode&&key!=this.closePanelKeyCode))
return true;if(this.isOpen()&&key==this.closePanelKeyCode)
this.close();else if(key==this.openPanelKeyCode)
this.open();return this.stopPropagation(e);};Spry.Widget.CollapsiblePanel.prototype.stopPropagation=function(e)
{if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;};Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers=function()
{var tab=this.getTab();if(!tab)
return;var self=this;Spry.Widget.CollapsiblePanel.addEventListener(tab,"click",function(e){return self.onTabClick(e);},false);Spry.Widget.CollapsiblePanel.addEventListener(tab,"mouseover",function(e){return self.onTabMouseOver(e);},false);Spry.Widget.CollapsiblePanel.addEventListener(tab,"mouseout",function(e){return self.onTabMouseOut(e);},false);if(this.enableKeyboardNavigation)
{var tabIndexEle=null;var tabAnchorEle=null;this.preorderTraversal(tab,function(node){if(node.nodeType==1)
{var tabIndexAttr=tab.attributes.getNamedItem("tabindex");if(tabIndexAttr)
{tabIndexEle=node;return true;}
if(!tabAnchorEle&&node.nodeName.toLowerCase()=="a")
tabAnchorEle=node;}
return false;});if(tabIndexEle)
this.focusElement=tabIndexEle;else if(tabAnchorEle)
this.focusElement=tabAnchorEle;if(this.focusElement)
{Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"focus",function(e){return self.onFocus(e);},false);Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"blur",function(e){return self.onBlur(e);},false);Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement,"keydown",function(e){return self.onKeyDown(e);},false);}}};Spry.Widget.CollapsiblePanel.addEventListener=function(element,eventType,handler,capture)
{try
{if(element.addEventListener)
element.addEventListener(eventType,handler,capture);else if(element.attachEvent)
element.attachEvent("on"+eventType,handler);}
catch(e){}};Spry.Widget.CollapsiblePanel.prototype.preorderTraversal=function(root,func)
{var stopTraversal=false;if(root)
{stopTraversal=func(root);if(root.hasChildNodes())
{var child=root.firstChild;while(!stopTraversal&&child)
{stopTraversal=this.preorderTraversal(child,func);try{child=child.nextSibling;}catch(e){child=null;}}}}
return stopTraversal;};Spry.Widget.CollapsiblePanel.prototype.attachBehaviors=function()
{var panel=this.element;var tab=this.getTab();var content=this.getContent();if(this.contentIsOpen||this.hasClassName(panel,this.openClass))
{this.addClassName(panel,this.openClass);this.removeClassName(panel,this.closedClass);this.setDisplay(content,"block");this.contentIsOpen=true;}
else
{this.removeClassName(panel,this.openClass);this.addClassName(panel,this.closedClass);this.setDisplay(content,"none");this.contentIsOpen=false;}
this.attachPanelHandlers();};Spry.Widget.CollapsiblePanel.prototype.getTab=function()
{return this.getElementChildren(this.element)[0];};Spry.Widget.CollapsiblePanel.prototype.getContent=function()
{return this.getElementChildren(this.element)[1];};Spry.Widget.CollapsiblePanel.prototype.isOpen=function()
{return this.contentIsOpen;};Spry.Widget.CollapsiblePanel.prototype.getElementChildren=function(element)
{var children=[];var child=element.firstChild;while(child)
{if(child.nodeType==1)
children.push(child);child=child.nextSibling;}
return children;};Spry.Widget.CollapsiblePanel.prototype.focus=function()
{if(this.focusElement&&this.focusElement.focus)
this.focusElement.focus();};Spry.Widget.CollapsiblePanel.PanelAnimator=function(panel,doOpen,opts)
{this.timer=null;this.interval=0;this.fps=60;this.duration=500;this.startTime=0;this.transition=Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition;this.onComplete=null;this.panel=panel;this.content=panel.getContent();this.doOpen=doOpen;Spry.Widget.CollapsiblePanel.setOptions(this,opts,true);this.interval=Math.floor(1000/this.fps);var c=this.content;var curHeight=c.offsetHeight?c.offsetHeight:0;this.fromHeight=(doOpen&&c.style.display=="none")?0:curHeight;if(!doOpen)
this.toHeight=0;else
{if(c.style.display=="none")
{c.style.visibility="hidden";c.style.display="block";}
c.style.height="";this.toHeight=c.offsetHeight;}
this.distance=this.toHeight-this.fromHeight;this.overflow=c.style.overflow;c.style.height=this.fromHeight+"px";c.style.visibility="visible";c.style.overflow="hidden";c.style.display="block";};Spry.Widget.CollapsiblePanel.PanelAnimator.defaultTransition=function(time,begin,finish,duration){time/=duration;return begin+((2-time)*time*finish);};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start=function()
{var self=this;this.startTime=(new Date).getTime();this.timer=setTimeout(function(){self.stepAnimation();},this.interval);};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop=function()
{if(this.timer)
{clearTimeout(this.timer);this.content.style.overflow=this.overflow;}
this.timer=null;};Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation=function()
{var curTime=(new Date).getTime();var elapsedTime=curTime-this.startTime;if(elapsedTime>=this.duration)
{if(!this.doOpen)
this.content.style.display="none";this.content.style.overflow=this.overflow;this.content.style.height=this.toHeight+"px";if(this.onComplete)
this.onComplete();return;}
var ht=this.transition(elapsedTime,this.fromHeight,this.distance,this.duration);this.content.style.height=((ht<0)?0:ht)+"px";var self=this;this.timer=setTimeout(function(){self.stepAnimation();},this.interval);};Spry.Widget.CollapsiblePanelGroup=function(element,opts)
{this.element=this.getElement(element);this.opts=opts;this.attachBehaviors();};Spry.Widget.CollapsiblePanelGroup.prototype.setOptions=Spry.Widget.CollapsiblePanel.prototype.setOptions;Spry.Widget.CollapsiblePanelGroup.prototype.getElement=Spry.Widget.CollapsiblePanel.prototype.getElement;Spry.Widget.CollapsiblePanelGroup.prototype.getElementChildren=Spry.Widget.CollapsiblePanel.prototype.getElementChildren;Spry.Widget.CollapsiblePanelGroup.prototype.setElementWidget=function(element,widget)
{if(!element||!widget)
return;if(!element.spry)
element.spry=new Object;element.spry.collapsiblePanel=widget;};Spry.Widget.CollapsiblePanelGroup.prototype.getElementWidget=function(element)
{return(element&&element.spry&&element.spry.collapsiblePanel)?element.spry.collapsiblePanel:null;};Spry.Widget.CollapsiblePanelGroup.prototype.getPanels=function()
{if(!this.element)
return[];return this.getElementChildren(this.element);};Spry.Widget.CollapsiblePanelGroup.prototype.getPanel=function(panelIndex)
{return this.getPanels()[panelIndex];};Spry.Widget.CollapsiblePanelGroup.prototype.attachBehaviors=function()
{if(!this.element)
return;var cpanels=this.getPanels();var numCPanels=cpanels.length;for(var i=0;i<numCPanels;i++)
{var cpanel=cpanels[i];this.setElementWidget(cpanel,new Spry.Widget.CollapsiblePanel(cpanel,this.opts));}};Spry.Widget.CollapsiblePanelGroup.prototype.openPanel=function(panelIndex)
{var w=this.getElementWidget(this.getPanel(panelIndex));if(w&&!w.isOpen())
w.open();};Spry.Widget.CollapsiblePanelGroup.prototype.closePanel=function(panelIndex)
{var w=this.getElementWidget(this.getPanel(panelIndex));if(w&&w.isOpen())
w.close();};Spry.Widget.CollapsiblePanelGroup.prototype.openAllPanels=function()
{var cpanels=this.getPanels();var numCPanels=cpanels.length;for(var i=0;i<numCPanels;i++)
{var w=this.getElementWidget(cpanels[i]);if(w&&!w.isOpen())
w.open();}};Spry.Widget.CollapsiblePanelGroup.prototype.closeAllPanels=function()
{var cpanels=this.getPanels();var numCPanels=cpanels.length;for(var i=0;i<numCPanels;i++)
{var w=this.getElementWidget(cpanels[i]);if(w&&w.isOpen())
w.close();}};var Spry;if(!Spry)Spry={};if(!Spry.Widget)Spry.Widget={};Spry.Widget.TabbedPanels=function(element,opts)
{this.element=this.getElement(element);this.defaultTab=0;this.tabSelectedClass="TabbedPanelsTabSelected";this.tabHoverClass="TabbedPanelsTabHover";this.tabFocusedClass="TabbedPanelsTabFocused";this.panelVisibleClass="TabbedPanelsContentVisible";this.focusElement=null;this.hasFocus=false;this.currentTabIndex=0;this.enableKeyboardNavigation=true;this.nextPanelKeyCode=Spry.Widget.TabbedPanels.KEY_RIGHT;this.previousPanelKeyCode=Spry.Widget.TabbedPanels.KEY_LEFT;Spry.Widget.TabbedPanels.setOptions(this,opts);if(typeof(this.defaultTab)=="number")
{if(this.defaultTab<0)
this.defaultTab=0;else
{var count=this.getTabbedPanelCount();if(this.defaultTab>=count)
this.defaultTab=(count>1)?(count-1):0;}
this.defaultTab=this.getTabs()[this.defaultTab];}
if(this.defaultTab)
this.defaultTab=this.getElement(this.defaultTab);this.attachBehaviors();};Spry.Widget.TabbedPanels.prototype.getElement=function(ele)
{if(ele&&typeof ele=="string")
return document.getElementById(ele);return ele;};Spry.Widget.TabbedPanels.prototype.getElementChildren=function(element)
{var children=[];var child=element.firstChild;while(child)
{if(child.nodeType==1)
children.push(child);child=child.nextSibling;}
return children;};Spry.Widget.TabbedPanels.prototype.addClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))!=-1))
return;ele.className+=(ele.className?" ":"")+className;};Spry.Widget.TabbedPanels.prototype.removeClassName=function(ele,className)
{if(!ele||!className||(ele.className&&ele.className.search(new RegExp("\\b"+className+"\\b"))==-1))
return;ele.className=ele.className.replace(new RegExp("\\s*\\b"+className+"\\b","g"),"");};Spry.Widget.TabbedPanels.setOptions=function(obj,optionsObj,ignoreUndefinedProps)
{if(!optionsObj)
return;for(var optionName in optionsObj)
{if(ignoreUndefinedProps&&optionsObj[optionName]==undefined)
continue;obj[optionName]=optionsObj[optionName];}};Spry.Widget.TabbedPanels.prototype.getTabGroup=function()
{if(this.element)
{var children=this.getElementChildren(this.element);if(children.length)
return children[0];}
return null;};Spry.Widget.TabbedPanels.prototype.getTabs=function()
{var tabs=[];var tg=this.getTabGroup();if(tg)
tabs=this.getElementChildren(tg);return tabs;};Spry.Widget.TabbedPanels.prototype.getContentPanelGroup=function()
{if(this.element)
{var children=this.getElementChildren(this.element);if(children.length>1)
return children[1];}
return null;};Spry.Widget.TabbedPanels.prototype.getContentPanels=function()
{var panels=[];var pg=this.getContentPanelGroup();if(pg)
panels=this.getElementChildren(pg);return panels;};Spry.Widget.TabbedPanels.prototype.getIndex=function(ele,arr)
{ele=this.getElement(ele);if(ele&&arr&&arr.length)
{for(var i=0;i<arr.length;i++)
{if(ele==arr[i])
return i;}}
return-1;};Spry.Widget.TabbedPanels.prototype.getTabIndex=function(ele)
{var i=this.getIndex(ele,this.getTabs());if(i<0)
i=this.getIndex(ele,this.getContentPanels());return i;};Spry.Widget.TabbedPanels.prototype.getCurrentTabIndex=function()
{return this.currentTabIndex;};Spry.Widget.TabbedPanels.prototype.getTabbedPanelCount=function(ele)
{return Math.min(this.getTabs().length,this.getContentPanels().length);};Spry.Widget.TabbedPanels.addEventListener=function(element,eventType,handler,capture)
{try
{if(element.addEventListener)
element.addEventListener(eventType,handler,capture);else if(element.attachEvent)
element.attachEvent("on"+eventType,handler);}
catch(e){}};Spry.Widget.TabbedPanels.prototype.cancelEvent=function(e)
{if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;};Spry.Widget.TabbedPanels.prototype.onTabClick=function(e,tab)
{this.showPanel(tab);return this.cancelEvent(e);};Spry.Widget.TabbedPanels.prototype.onTabMouseOver=function(e,tab)
{this.addClassName(tab,this.tabHoverClass);return false;};Spry.Widget.TabbedPanels.prototype.onTabMouseOut=function(e,tab)
{this.removeClassName(tab,this.tabHoverClass);return false;};Spry.Widget.TabbedPanels.prototype.onTabFocus=function(e,tab)
{this.hasFocus=true;this.addClassName(tab,this.tabFocusedClass);return false;};Spry.Widget.TabbedPanels.prototype.onTabBlur=function(e,tab)
{this.hasFocus=false;this.removeClassName(tab,this.tabFocusedClass);return false;};Spry.Widget.TabbedPanels.KEY_UP=38;Spry.Widget.TabbedPanels.KEY_DOWN=40;Spry.Widget.TabbedPanels.KEY_LEFT=37;Spry.Widget.TabbedPanels.KEY_RIGHT=39;Spry.Widget.TabbedPanels.prototype.onTabKeyDown=function(e,tab)
{var key=e.keyCode;if(!this.hasFocus||(key!=this.previousPanelKeyCode&&key!=this.nextPanelKeyCode))
return true;var tabs=this.getTabs();for(var i=0;i<tabs.length;i++)
if(tabs[i]==tab)
{var el=false;if(key==this.previousPanelKeyCode&&i>0)
el=tabs[i-1];else if(key==this.nextPanelKeyCode&&i<tabs.length-1)
el=tabs[i+1];if(el)
{this.showPanel(el);el.focus();break;}}
return this.cancelEvent(e);};Spry.Widget.TabbedPanels.prototype.preorderTraversal=function(root,func)
{var stopTraversal=false;if(root)
{stopTraversal=func(root);if(root.hasChildNodes())
{var child=root.firstChild;while(!stopTraversal&&child)
{stopTraversal=this.preorderTraversal(child,func);try{child=child.nextSibling;}catch(e){child=null;}}}}
return stopTraversal;};Spry.Widget.TabbedPanels.prototype.addPanelEventListeners=function(tab,panel)
{var self=this;Spry.Widget.TabbedPanels.addEventListener(tab,"click",function(e){return self.onTabClick(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(tab,"mouseover",function(e){return self.onTabMouseOver(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(tab,"mouseout",function(e){return self.onTabMouseOut(e,tab);},false);if(this.enableKeyboardNavigation)
{var tabIndexEle=null;var tabAnchorEle=null;this.preorderTraversal(tab,function(node){if(node.nodeType==1)
{var tabIndexAttr=tab.attributes.getNamedItem("tabindex");if(tabIndexAttr)
{tabIndexEle=node;return true;}
if(!tabAnchorEle&&node.nodeName.toLowerCase()=="a")
tabAnchorEle=node;}
return false;});if(tabIndexEle)
this.focusElement=tabIndexEle;else if(tabAnchorEle)
this.focusElement=tabAnchorEle;if(this.focusElement)
{Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"focus",function(e){return self.onTabFocus(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"blur",function(e){return self.onTabBlur(e,tab);},false);Spry.Widget.TabbedPanels.addEventListener(this.focusElement,"keydown",function(e){return self.onTabKeyDown(e,tab);},false);}}};Spry.Widget.TabbedPanels.prototype.showPanel=function(elementOrIndex)
{var tpIndex=-1;if(typeof elementOrIndex=="number")
tpIndex=elementOrIndex;else
tpIndex=this.getTabIndex(elementOrIndex);if(!tpIndex<0||tpIndex>=this.getTabbedPanelCount())
return;var tabs=this.getTabs();var panels=this.getContentPanels();var numTabbedPanels=Math.max(tabs.length,panels.length);for(var i=0;i<numTabbedPanels;i++)
{if(i!=tpIndex)
{if(tabs[i])
this.removeClassName(tabs[i],this.tabSelectedClass);if(panels[i])
{this.removeClassName(panels[i],this.panelVisibleClass);panels[i].style.display="none";}}}
this.addClassName(tabs[tpIndex],this.tabSelectedClass);this.addClassName(panels[tpIndex],this.panelVisibleClass);panels[tpIndex].style.display="block";this.currentTabIndex=tpIndex;};Spry.Widget.TabbedPanels.prototype.attachBehaviors=function(element)
{var tabs=this.getTabs();var panels=this.getContentPanels();var panelCount=this.getTabbedPanelCount();for(var i=0;i<panelCount;i++)
this.addPanelEventListeners(tabs[i],panels[i]);this.showPanel(this.defaultTab);};(function($){$.fn.easySlider=function(options){var defaults={prevId:'prevBtn',prevText:'Previous',nextId:'nextBtn',nextText:'Next',controlsShow:true,controlsBefore:'',controlsAfter:'',controlsFade:true,firstId:'firstBtn',firstText:'First',firstShow:false,lastId:'lastBtn',lastText:'Last',lastShow:false,vertical:false,speed:800,auto:false,pause:10000,continuous:true,numeric:true,numericId:'controls'};var options=$.extend(defaults,options);this.each(function(){var obj=$(this);var s=$("li",obj).length;var w=$("li",obj).width();var h=$("li",obj).height();var clickable=true;obj.width(w);obj.height(h);obj.css("overflow","hidden");var ts=s-1;var t=0;$("ul",obj).css('width',s*w);if(options.continuous){$("ul",obj).prepend($("ul li:last-child",obj).clone().css("margin-left","-"+w+"px"));$("ul",obj).append($("ul li:nth-child(2)",obj).clone());$("ul",obj).css('width',(s+1)*w);};if(!options.vertical)$("li",obj).css('float','left');if(options.controlsShow){var html=options.controlsBefore;if(options.numeric){html+='<ol id="'+options.numericId+'"></ol>';}else{if(options.firstShow)html+='<span id="'+options.firstId+'"><a href=\"javascript:void(0);\">'+options.firstText+'</a></span>';html+=' <span id="'+options.prevId+'"><a href=\"javascript:void(0);\">'+options.prevText+'</a></span>';html+=' <span id="'+options.nextId+'"><a href=\"javascript:void(0);\">'+options.nextText+'</a></span>';if(options.lastShow)html+=' <span id="'+options.lastId+'"><a href=\"javascript:void(0);\">'+options.lastText+'</a></span>';};html+=options.controlsAfter;$(obj).after(html);};if(options.numeric){for(var i=0;i<s;i++){$(document.createElement("li")).attr('id',options.numericId+(i+1)).html('<a rel='+i+' href=\"javascript:void(0);\">'+(i+1)+'</a>').appendTo($("#"+options.numericId)).click(function(){animate($("a",$(this)).attr('rel'),true);});};}else{$("a","#"+options.nextId).click(function(){animate("next",true);});$("a","#"+options.prevId).click(function(){animate("prev",true);});$("a","#"+options.firstId).click(function(){animate("first",true);});$("a","#"+options.lastId).click(function(){animate("last",true);});};function setCurrent(i){i=parseInt(i)+1;$("li","#"+options.numericId).removeClass("current");$("li#"+options.numericId+i).addClass("current");};function adjust(){if(t>ts)t=0;if(t<0)t=ts;if(!options.vertical){$("ul",obj).css("margin-left",(t*w*-1));}else{$("ul",obj).css("margin-left",(t*h*-1));}
clickable=true;if(options.numeric)setCurrent(t);};function animate(dir,clicked){if(clickable){clickable=false;var ot=t;switch(dir){case"next":t=(ot>=ts)?(options.continuous?t+1:ts):t+1;break;case"prev":t=(t<=0)?(options.continuous?t-1:0):t-1;break;case"first":t=0;break;case"last":t=ts;break;default:t=dir;break;};var diff=Math.abs(ot-t);var speed=diff*options.speed;if(!options.vertical){p=(t*w*-1);$("ul",obj).animate({marginLeft:p},{queue:false,duration:speed,complete:adjust});}else{p=(t*h*-1);$("ul",obj).animate({marginTop:p},{queue:false,duration:speed,complete:adjust});};if(!options.continuous&&options.controlsFade){if(t==ts){$("a","#"+options.nextId).hide();$("a","#"+options.lastId).hide();}else{$("a","#"+options.nextId).show();$("a","#"+options.lastId).show();};if(t==0){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();}else{$("a","#"+options.prevId).show();$("a","#"+options.firstId).show();};};if(clicked)clearTimeout(timeout);if(options.auto&&dir=="next"&&!clicked){;timeout=setTimeout(function(){animate("next",false);},diff*options.speed+options.pause);};};};var timeout;if(options.auto){;timeout=setTimeout(function(){animate("next",false);},options.pause);};if(options.numeric)setCurrent(0);if(!options.continuous&&options.controlsFade){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide();};});};})(jQuery);



function showFGS() {
	try { 
	document.getElementById('leftFGS').style.display = 'none';
                a = document.getElementById('fgs');
				
				//alert( document.getElementById('detailsSD').innerHTML.replace(' ','').length);
                if ( document.getElementById('detailsSD').innerHTML.replace(' ','').length > 15  ) { 
                                a.style.display = 'none';
                	document.getElementById('leftFGS').style.display = '';
					
                } 
				
	}
	catch(err) { }
	}
	
	
	//Move Float Text to bottom of page.
	$(document).ready( function() { 
	var floatOffset =  ( $(document).height() + $('#floattext').height() ) * -1 ;    //Move floattext just below the footer
		
		$('#floattext').css('bottom',floatOffset);
		
	});
	
	
	
	
	function getAccessories( storeid  )  { 
	
	
	
	try
		{
			// Firefox, Opera 8.0+, Safari
			xmlhttp=new XMLHttpRequest();
		}
		catch (e)
	{
	// Internet Explorer
	try
		{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
	catch (e)
		{
		try
			{
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
		catch (e)
			{
		
			return false;
			}
		}
	}

	

	
	xmlhttpStr = "/ajaxhandler.ashx?action=getSuggested&itemnumber=" + $('span.ShoppingCartItemNr').eq( $('span.ShoppingCartItemNr').size() -2  ).text() + "&storeid=" + storeid;
	
//alert(xmlhttpStr);
	xmlhttp.open("POST",xmlhttpStr,true);

	
	xmlhttp.send();
	
	
	 
	
	
	xmlhttp.onreadystatechange = function() 
	{ 

		document.getElementById("suggestTxt").innerHTML = xmlhttp.responseText;
	
   }
		
		
	
	
	
	
	} 
	
	function moretoggle(txtLess,txtMore) {     
document.getElementById("morediv")
.style.display = document.getElementById("morediv")
.style.display == "none" ? "block" : "none";     
document.getElementById("moreless").innerHTML = document.getElementById("moreless").innerHTML == txtLess ? txtMore : txtLess; 
} 




dw_Tooltip.defaultProps = {

    wrapFn: dw_Tooltip.wrapImageOverText

}



dw_Tooltip.content_vars = {

    L1: {

        img: '//v3.alltecstores.com/themes/images/GiftCard_toolTip_image.jpg',

        txt: '',

        w:200 // width of tooltip

		

    },

	Accurate: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'Accurate sound reproduction is usually referred to as tonally-balanced – colorations to sound are very little to none.',

        w:300 // width of tooltip

		

    },

	ActiveNoiseCancellation: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'ANC is featured in many consumer products. How it works: A small microphone picks up the ambient noise around the headphone and emits a reverse sound image to cancel out as much of the outside sound as possible. Why is this not used in every headphone (especially the super expensive ones)? The reason is because there is a degree of distortion added to the audio signal when this takes place. ',

        w:300 // width of tooltip

		

    },

	Attenuate: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'Reduced volume. ',

        w:300 // width of tooltip

		

    },

	

	Analytical: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'Also referred to as cold, audiophiles refer to a sound as analytical when referring to a very detailed, not overly bassy headphone. A lot of engineers prefer mixing/mastering on analytical headphones because it is not very forgiving and will emphasize the problems in the mix.',

        w:300 // width of tooltip

		

    },

	Armature: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: '(aka balanced armature) Almost exclusively used in IEM design because of size and efficiency, balanced armature design employs a moving magnetic armature. As the armature alternates on its pivot in the field of a fixed magnet coil is moved causing the diaphragm to vibrate and create sound. While this design works amazingly for very small designs, it is not employed in full size and supra-aural headphones because it needs to be extremely close up to ear to reach its full potential, requiring a good seal. There is also a limitation in this design to how high the treble can extend.',

        w:300 // width of tooltip

		

    },

	

	Bass: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'Low end frequencies (roughly 20-200 Hz). Ok, so everyone loves good bass response. But what is good bass response? Depending on whom you ask the opinion will vary almost to complete opposite definitions. Even still, the consensus amongst the general consumer is good bass = punchy, full and impactful. Audible bass frequencies start roughly at about 20 cycles per second (cycles are measured in Hertz or Hz) to about 200 Hz. Some people may refer to bass as low frequency or low end',

        w:300 // width of tooltip

		

    },

	

	Boomy: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'A reference to accentuated bass impact (usually spoken from a negative perspective).',

        w:300 // width of tooltip

		

    },

	

	Bright: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'Accentuated treble response.',

        w:300 // width of tooltip

		

    },

	

	Canalphones: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: '(see In-Ear-Monitors)',

        w:300 // width of tooltip

		

    },

	

	Circumaural: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'Over the ear / Around the ear design.',

        w:300 // width of tooltip

		

    },

	

	Colored: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'A reference to the frequency response having emphasis in specific areas of the audio spectrum.',

        w:300 // width of tooltip

		

    },

	

	Clarity: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'How clear is the sound? This is dependent very much on the minimization of harmonic distortion, the transducer&#39;s transient response and overall tonal balance.',

        w:300 // width of tooltip

		

    },

	Clipping: {

        img: '//v3.alltecstores.com/themes/images/spacer.gif',

        txt: 'A type of distortion which occurs when the amplifier cannot meet the demands of the transducer.',

        w:300 // width of tooltip

		

    },

	tenP: {

        img: '//v3.alltecstores.com/themes/images/toolTip_10p.png',

        txt: '',

        w:200 // width of tooltip

		

    },

	save5: {

        img: '//v3.alltecstores.com/themes/images/toolTip_save5.jpg',

        txt: '',

        w:200 // width of tooltip

		

    },

	wordmark: {

        img: '//v3.alltecstores.com/themes/images/collateral_wordmark.jpg',

        txt: '',

        w:406 // width of tooltip

		

    },

	authorized: {

        img: '//v3.alltecstores.com/themes/images/ToolTip_authorized.jpg',

        txt: '',

        w:200 // width of tooltip

		

    }

	

}




	
	//clickTarget Script. Clicks any element on the page, if clickTarget= appears in the querystring 
	
	$().ready(function() {
		if (document.location.href.indexOf('clicktarget=') > 0 ) { 
		 	
			try { 
			startingLocation  = document.location.href.indexOf('clicktarget=') + 12; 
			tempQueryString = document.location.href.substring(startingLocation,document.location.href.length);
			
			if ( tempQueryString.indexOf('&') > 0 ) 
			{ 
				elementToClick =  tempQueryString.substring(0,tempQueryString.indexOf('&'));
			 
			}
			else 
			{
				elementToClick = tempQueryString.substring(0,tempQueryString.length);	
			}
	       
			}
			catch(e) { }
			$("#" + elementToClick).click();
		}
	});
