function make_onclick(_1){
var _2=_1;
return function(){
if(_2){
if(!_2()){
return false;
}
}
return pop(this,this.href);
};
}
function set_magic_anchors(){
var x=document.getElementsByTagName("a");
for(var i=0;i<x.length;i++){
var _5;
if((_5=x[i].className.match(/\bpopup_link(\(\s*(\d+)\s*,\s*(\d+)\s*\)|\b)/))){
x[i].onclick=make_onclick(x[i].onclick?x[i].onclick:null);
if(!x[i].title){
var _6=x[i].getElementsByTagName("img");
if(_6.length>0){
x[i].title=_6[0].getAttribute("alt");
_6[0].setAttribute("alt",x[i].title+" (Popup)");
}
}
x[i].title+=" (Popup)";
if(_5[2]){
x[i].setAttribute("popup_width",_5[2]);
}
if(_5[3]){
x[i].setAttribute("popup_height",_5[3]);
}
}
if((_5=x[i].className.match(/\brollover\(([^\)]*)\)/))){
create_rollover(x[i],_5[1]);
}
if(x[i].className.match(/\bneedsWishlist/)){
var _7=1;
}
}
if(_7){
var _8=new Wishlist_check();
_8.load();
}
}
function create_rollover(_9,_a){
var _b=_9.onmouseover;
var _c=_9.onmouseout;
var _d=_9.onmousedown;
var _e=_9.onmouseup;
var _f=_9.getElementsByTagName("img");
if(_f.length==0){
return;
}
var _10=_f[0].id;
var _11=_f[0].src;
_9.onmouseover=function(e){
changeImages(_10,_a);
if(_b){
return _b(e);
}
return undefined;
};
_9.onmouseout=function(e){
changeImages(_10,_11);
if(_c){
return _c(e);
}
return undefined;
};
_9.onmousedown=function(e){
changeImages(_10,_a);
if(_d){
return _d(e);
}
return undefined;
};
_9.onmouseup=function(e){
changeImages(_10,_a);
if(_e){
return _e(e);
}
return undefined;
};
preloadImage(_a);
}
function preloadImage(_16){
if(!preloadImage.preloaded_images||!preloadImage.preloaded_images[_16]){
var _17=newImage(_16);
if(!preloadImage.preloaded_images){
preloadImage.preloaded_images=new Object();
}
preloadImage.preloaded_images[_16]=1;
}
}
function pop(_18,url){
var _1a=false;
var _1b=false;
var _1c=500;
var _1d=350;
if(_18.className.match(/\bexternal_link\b/)){
_1b=true;
}
if(_18.getAttribute("popup_height")){
_1a=true;
_1c=_18.getAttribute("popup_height");
}
if(_18.getAttribute("popup_width")){
_1a=true;
_1d=_18.getAttribute("popup_width");
}
var _1e="";
if(_1a||!_1b){
_1e="height="+_1c+",width="+_1d+",";
}
_1e=_1e+"resizable, scrollbars, status";
if(_1b){
_1e=_1e+",toolbar,menubar,location,directories";
}
newwindow=window.open(url,"x"+(new Date()).getTime(),_1e);
if(newwindow.focus){
newwindow.focus();
}
return false;
}
function newImage(arg){
if(document.images){
var _20=new Image();
_20.src=arg;
return _20;
}
return undefined;
}
function changeImages(){
if(document.images){
for(var ii=0;ii<arguments.length;ii+=2){
ss_getElementById(arguments[ii]).src=arguments[ii+1];
}
}
}
