var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=navigator.appName=="Netscape"&&!isDOM?1:0;
var isOp=self.opera?1:0;
var isDyn=isDOM||isIE||isNS4;
function getRef(i,p){
p=!p?document:p.navigator?p.document:p;
return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null;
};
function getSty(i,p){
var r=getRef(i,p);
return r?isNS4?r:r.style:null;
};
if(!self.LayerObj){
var LayerObj=new Function("i","p","this.ref=getRef(i,p);this.sty=getSty(i,p);return this");
}
function getLyr(i,p){
return new LayerObj(i,p);
};
function LyrFn(n,f){
LayerObj.prototype[n]=new Function("var a=arguments,p=a[0],px=isNS4||isOp?0:\"px\";with(this){"+f+"}");
};
LyrFn("x","if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)");
LyrFn("y","if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)");
var aeOL=[];
function addEvent(o,n,f,l){
var a="addEventListener",h="on"+n,b="",s="";
if(o[a]&&!l){
return o[a](n,f,false);
}
o._c|=0;
if(o[h]){
b="_f"+o._c++;
o[b]=o[h];
}
s="_f"+o._c++;
o[s]=f;
o[h]=function(e){
e=e||window.event;
var r=true;
if(b){
r=o[b](e)!=false&&r;
}
r=o[s](e)!=false&&r;
return r;
};
aeOL[aeOL.length]={o:o,h:h};
};
function FSMenu(_14,_15,_16,_17,_18){
this.myName=_14;
this.nested=_15;
this.cssProp=_16;
this.cssVis=_17;
this.cssHid=_18;
this.cssLitClass="";
this.menus={root:new FSMenuNode("root",true,this)};
this.menuToShow=[];
this.mtsTimer=null;
this.showDelay=0;
this.switchDelay=125;
this.hideDelay=500;
this.showOnClick=0;
this.animations=[];
this.animSpeed=100;
};
FSMenu.prototype.show=function(mN){
with(this){
menuToShow.length=arguments.length;
for(var i=0;i<arguments.length;i++){
menuToShow[i]=arguments[i];
}
clearTimeout(mtsTimer);
if(!nested){
mtsTimer=setTimeout(myName+".menus.root.over()",10);
}
}
};
FSMenu.prototype.hide=function(mN){
with(this){
clearTimeout(mtsTimer);
if(menus[mN]){
menus[mN].out();
}
}
};
function FSMenuNode(id,_1d,obj){
this.id=id;
this.isRoot=_1d;
this.obj=obj;
this.lyr=this.child=this.par=this.timer=this.visible=null;
this.args=[];
var _1f=this;
this.over=function(evt){
with(_1f){
with(obj){
if(isNS4&&evt&&lyr.ref){
lyr.ref.routeEvent(evt);
}
clearTimeout(timer);
clearTimeout(mtsTimer);
if(!_1d&&!visible){
_1f.show();
}
if(menuToShow.length){
var a=menuToShow,m=a[0];
if(!menus[m]||!menus[m].lyr.ref){
menus[m]=new FSMenuNode(m,false,obj);
}
var c=menus[m];
if(c==_1f){
menuToShow.length=0;
return;
}
clearTimeout(c.timer);
if(c!=child&&c.lyr.ref){
c.args.length=a.length;
for(var i=0;i<a.length;i++){
c.args[i]=a[i];
}
var _25=child?switchDelay:showDelay;
c.timer=setTimeout("with("+myName+"){menus[\""+c.id+"\"].par=menus[\""+_1f.id+"\"];menus[\""+c.id+"\"].show()}",_25?_25:1);
}
menuToShow.length=0;
}
if(!nested&&par){
par.over();
}
}
}
};
this.out=function(evt){
with(_1f){
with(obj){
if(isNS4&&evt&&lyr&&lyr.ref){
lyr.ref.routeEvent(evt);
}
clearTimeout(timer);
if(!_1d){
timer=setTimeout(myName+".menus[\""+id+"\"].hide()",hideDelay);
if(!nested&&par){
par.out();
}
}
}
}
};
if(this.id!="root"){
with(this){
with(lyr=getLyr(id)){
if(ref){
if(isNS4){
ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);
}
addEvent(ref,"mouseover",this.over);
addEvent(ref,"mouseout",this.out);
if(obj.nested){
addEvent(ref,"focus",this.over);
addEvent(ref,"click",this.over);
addEvent(ref,"blur",this.out);
}
}
}
}
}
};
FSMenuNode.prototype.show=function(){
with(this){
with(obj){
if(!lyr||!lyr.ref){
return;
}
if(par){
if(par.child&&par.child!=this){
par.child.hide();
}
par.child=this;
}
var _27=args[1],_28=args[2],_29=args[3],lX=0,lY=0,doX=""+_28!="undefined",doY=""+_29!="undefined";
if(self.page&&_27&&(doX||doY)){
with(page.elmPos(_27,par.lyr?par.lyr.ref:0)){
lX=x,lY=y;
}
if(doX){
lyr.x(lX+eval(_28));
}
if(doY){
lyr.y(lY+eval(_29));
}
}
if(_27){
lightParent(_27,1);
}
visible=1;
if(obj.onshow){
obj.onshow(id);
}
setVis(1);
}
}
};
FSMenuNode.prototype.hide=function(){
with(this){
with(obj){
if(!lyr||!lyr.ref){
return;
}
if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref)){
return show();
}
if(args[1]){
lightParent(args[1],0);
}
if(child){
child.hide();
}
if(par&&par.child==this){
par.child=null;
}
if(lyr){
visible=0;
if(obj.onhide){
obj.onhide(id);
}
setVis(0);
}
}
}
};
FSMenuNode.prototype.lightParent=function(elm,lit){
with(this){
with(obj){
if(!cssLitClass||isNS4){
return;
}
if(lit){
elm.className+=(elm.className?" ":"")+cssLitClass;
}else{
elm.className=elm.className.replace(new RegExp("(\\s*"+cssLitClass+")+$"),"");
}
}
}
};
FSMenuNode.prototype.setVis=function(sh){
with(this){
with(obj){
lyr.timer|=0;
lyr.counter|=0;
with(lyr){
clearTimeout(timer);
if(sh&&!counter){
sty[cssProp]=cssVis;
}
if(isDOM&&animSpeed<100){
for(var a=0;a<animations.length;a++){
animations[a](ref,counter);
}
}
counter+=animSpeed*(sh?1:-1);
if(counter>100){
counter=100;
}else{
if(counter<=0){
counter=0;
sty[cssProp]=cssHid;
}else{
if(isDOM){
timer=setTimeout(myName+".menus[\""+id+"\"].setVis("+sh+")",50);
}
}
}
}
}
}
};
FSMenu.prototype.activateMenu=function(id,_33){
with(this){
if(!isDOM||!document.documentElement){
return;
}
var a,ul,li,_37,_38=getRef(id),_39,_3a=1;
if(isIE){
var _3b=_38.getElementsByTagName("a");
for(var i=0;i<_3b.length;i++){
addEvent(_3b[i],"focus",new Function("e","var node=this.parentNode;while(node){if(node.onfocus)setTimeout(node.onfocus,1,e);node=node.parentNode}"));
addEvent(_3b[i],"blur",new Function("e","var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}"));
}
}
var _3d=_38.getElementsByTagName("ul");
for(var i=0;i<_3d.length;i++){
li=ul=_3d[i];
while(li){
if(li.nodeName.toLowerCase()=="li"){
break;
}
li=li.parentNode;
}
if(!li){
continue;
}
_37=li;
while(_37){
if(_37.nodeName.toLowerCase()=="ul"){
break;
}
_37=_37.parentNode;
}
a=null;
for(var j=0;j<li.childNodes.length;j++){
if(li.childNodes[j].nodeName.toLowerCase()=="a"){
a=li.childNodes[j];
}
}
if(!a){
continue;
}
var _3f=myName+"-id-"+_3a++;
if(ul.id){
_3f=ul.id;
}else{
ul.setAttribute("id",_3f);
}
var sOC=(showOnClick==1&&li.parentNode==_38)||(showOnClick==2);
var _41=new Function("with("+myName+"){var m=menus[\""+_3f+"\"],pM=menus[\""+_37.id+"\"];"+(sOC?"if((pM&&pM.child)||(m&&m.visible))":"")+" show(\""+_3f+"\",this)}");
var _42=new Function(myName+".hide(\""+_3f+"\")");
addEvent(a,"mouseover",_41);
addEvent(a,"focus",_41);
addEvent(a,"mouseout",_42);
addEvent(a,"blur",_42);
if(sOC){
addEvent(a,"click",new Function("e",myName+".show(\""+_3f+"\",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.returnValue=false;return false"));
}
if(_33){
a.insertBefore(_33.cloneNode(true),a.firstChild);
}
}
menus[id]=new FSMenuNode(id,true,this);
}
};
if(!self.page){
var page={win:self,minW:0,minH:0,MS:isIE&&!isOp};
}
page.elmPos=function(e,p){
var x=0,y=0,w=p?p:this.win;
e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
if(isNS4){
if(e&&(e!=p)){
x=e.x;
y=e.y;
}
if(p){
x+=p.pageX;
y+=p.pageY;
}
}
if(e&&this.MS&&navigator.platform.indexOf("Mac")>-1&&e.tagName=="A"){
e.onfocus=new Function("with(event){self.tmpX=clientX-offsetX;self.tmpY=clientY-offsetY}");
e.focus();
x=tmpX;
y=tmpY;
e.blur();
}else{
while(e){
x+=e.offsetLeft;
y+=e.offsetTop;
e=e.offsetParent;
}
}
return {x:x,y:y};
};
if(isNS4){
var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;
document.fsmMM=document.onmousemove;
self.onresize=function(){
if(fsmOR){
fsmOR();
}
if(nsWinW!=innerWidth||nsWinH!=innerHeight){
location.reload();
}
};
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=function(e){
fsmMouseX=e.pageX;
fsmMouseY=e.pageY;
return document.fsmMM?document.fsmMM(e):document.routeEvent(e);
};
function isMouseIn(sty){
with(sty){
return ((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height));
}
};
}
var divMenu=new FSMenu("divMenu",false,"visibility","visible","hidden");
divMenu.showDelay=250;
divMenu.switchDelay=250;
divMenu.hideDelay=300;
divMenu.cssLitClass="highlighted";
divMenu.showOnClick=1;
FSMenu.prototype.onshow=function(mN){
with(this){
var m=menus[mN];
if(!isIE||!window.createPopup){
return;
}
if(!m.ifr){
m.ifr=document.createElement("iframe");
m.ifr.src="javascript:'<html></html>';";
with(m.ifr.style){
position="absolute";
border="none";
filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
}
m.lyr.ref.parentNode.insertBefore(m.ifr,m.lyr.ref);
}
with(m.ifr.style){
left=m.lyr.ref.offsetLeft+"px";
top=m.lyr.ref.offsetTop+"px";
width=m.lyr.ref.offsetWidth+"px";
height=m.lyr.ref.offsetHeight+"px";
visibility="visible";
}
}
};
FSMenu.prototype.onhide=function(mN){
with(this){
if(!isIE||!window.createPopup){
return;
}
var m=menus[mN];
if(m.ifr){
m.ifr.style.visibility="hidden";
}
}
};
function gobackOnBc(_4e,_4f,_50){
document.CategoryNavigateForm.ip_constrain.value=_4e;
if(_4f==null||_4f==-1){
document.CategoryNavigateForm.ip_state.value=_50;
document.CategoryNavigateForm.categoryId.value="";
document.CategoryNavigateForm.ip_navtype.value="search";
}else{
document.CategoryNavigateForm.ip_state.value="";
document.CategoryNavigateForm.categoryId.value=_4f;
if(_4e!=null&&_4e.length==0){
document.CategoryNavigateForm.ip_navtype.value="topcategory";
}else{
document.CategoryNavigateForm.ip_navtype.value="browse";
}
}
document.CategoryNavigateForm.submit();
};
function hideSelects(_51){
if(_51!="visible"){
_51="hidden";
}
if(navigator.appName.indexOf("MSIE")){
for(var S=0;S<document.forms.length;s++){
for(var R=0;R<document.forms[s].length;R++){
if(document.forms[S].elements[R].options){
document.forms[S].elements[R].style.visibility=_51;
}
}
}
}
};
function findPosX(obj){
var _55=0;
if(obj!=null){
if(obj.offsetParent){
while(1){
_55+=obj.offsetLeft;
if(!obj.offsetParent){
break;
}
obj=obj.offsetParent;
}
}else{
if(obj.x){
_55+=obj.x;
}
}
}
return _55;
};
function findPosY(obj){
var _57=0;
if(obj!=null){
if(obj.offsetParent){
while(1){
_57+=obj.offsetTop;
if(!obj.offsetParent){
break;
}
obj=obj.offsetParent;
}
}else{
if(obj.y){
_57+=obj.y;
}
}
}
return _57;
};
function showDrop(_58){
var _59=findPosX(document.getElementById("td"+_58));
var _5a=findPosY(document.getElementById("td"+_58));
document.getElementById(_58).style.left=_59;
document.getElementById(_58).style.top=(_5a+29);
document.getElementById(_58).style.visibility="visible";
document.getElementById(_58+"iframe").style.left=_59;
document.getElementById(_58+"iframe").style.top=(_5a+29);
document.getElementById(_58+"iframe").style.display="block";
document.getElementById(_58+"iframe").style.height=document.getElementById(_58).offsetHeight;
document.getElementById(_58+"iframe").style.width=document.getElementById(_58).offsetWidth;
};
function hideDrop(_5b){
document.getElementById(_5b).style.visibility="hidden";
document.getElementById(_5b+"iframe").style.display="none";
};
function showCartDrop(_5c){
var _5d=findPosX(document.getElementById("wishAccordion"));
var _5e=findPosY(document.getElementById("wishAccordion"));
catElement=document.getElementById(_5c);
iframeElement=document.getElementById(_5c+"iframe");
catElement.style.left=_5d;
catElement.style.top=(_5e+23);
catElement.style.visibility="visible";
iframeElement.style.left=_5d;
iframeElement.style.top=(_5e+23);
iframeElement.style.display="block";
iframeElement.style.height=document.getElementById(_5c).offsetHeight;
iframeElement.style.width=document.getElementById(_5c).offsetWidth;
if(_5c=="wish"){
document.getElementById("wishAccordion").style.backgroundImage="url(images/tab_wishlist_HL.jpg)";
}else{
document.getElementById("cartAccordion").style.backgroundImage="url(images/tab_cart_HL.jpg)";
}
};
function hideCartDrop(_5f){
document.getElementById(_5f).style.visibility="hidden";
document.getElementById(_5f+"iframe").style.display="none";
if(_5f=="wish"){
document.getElementById("wishAccordion").style.backgroundImage="url(images/tab_wishlist_reg.jpg)";
}else{
document.getElementById("cartAccordion").style.backgroundImage="url(images/tab_cart_reg.jpg)";
}
};

