var number_format_dec='.';var number_format_th='';var number_format_point='2';var store_language='US';var xcart_web_dir='';var images_dir='/var/www/vhosts/secureuniverse.co.uk/httpdocs/images';var lbl_no_items_have_been_selected='No items have been selected';var current_area='C';
var localIsDOM=document.getElementById?true:false;var localIsJava=navigator.javaEnabled();var localIsStrict=document.compatMode=='CSS1Compat';var localPlatform=navigator.platform;var localVersion="0";var localBrowser="";var localBFamily="";var isHttps=false;if(window.opera&&localIsDOM){localBFamily=localBrowser="Opera";if(navigator.userAgent.search(/^.*Opera.([\d.]+).*$/)!=-1)
localVersion=navigator.userAgent.replace(/^.*Opera.([\d.]+).*$/,"$1");else if(window.print)
localVersion="6";else
localVersion="5";}else if(document.all&&document.all.item)
localBFamily=localBrowser='MSIE';if(navigator.appName=="Netscape"){localBFamily="NC";if(!localIsDOM){localBrowser='Netscape';localVersion=navigator.userAgent.replace(/^.*Mozilla.([\d.]+).*$/,"$1");if(localVersion!='')
localVersion="4";}else if(navigator.userAgent.indexOf("Safari")>=0)
localBrowser='Safari';else if(navigator.userAgent.indexOf("Netscape")>=0)
localBrowser='Netscape';else if(navigator.userAgent.indexOf("Firefox")>=0)
localBrowser='Firefox';else
localBrowser='Mozilla';}
if(navigator.userAgent.indexOf("MSMSGS")>=0)
localBrowser="WMessenger";else if(navigator.userAgent.indexOf("e2dk")>=0)
localBrowser="Edonkey";else if(navigator.userAgent.indexOf("Gnutella")+navigator.userAgent.indexOf("Gnucleus")>=0)
localBrowser="Gnutella";else if(navigator.userAgent.indexOf("KazaaClient")>=0)
localBrowser="Kazaa";if(localVersion=='0'&&localBrowser!=''){var rg=new RegExp("^.*"+localBrowser+".([\\d.]+).*$");localVersion=navigator.userAgent.replace(rg,"$1");}
var localIsCookie=((localBrowser=='Netscape'&&localVersion=='4')?(document.cookie!=''):navigator.cookieEnabled);if(document.location.protocol=="https:"){isHttps=true;}
function change_antibot_image(id){var image=document.getElementById(id);if(image)
image.src=xcart_web_dir+"/antibot_image.php?tmp="+Math.random()+"&section="+id+"&regenerate=Y";}
function getElementsByClassName(clsName){var arr=new Array();var elems=document.getElementsByTagName("*");for(var cls,i=0;(elem=elems[i]);i++){if(elem.className==clsName){arr[arr.length]=elem;}}
return arr;}
function visibleBox(id,skipOpenClose){elm1=document.getElementById("open"+id);elm2=document.getElementById("close"+id);elm3=document.getElementById("box"+id);if(!elm3)
return false;if(skipOpenClose){elm3.style.display=(elm3.style.display=="")?"none":"";}else if(elm1){if(elm1.style.display==""){elm1.style.display="none";if(elm2)
elm2.style.display="";elm3.style.display="none";var class_objs=getElementsByClassName('DialogBox');for(var i=0;i<class_objs.length;i++){class_objs[i].style.height="1%";}}else{elm1.style.display="";if(elm2)
elm2.style.display="none";elm3.style.display="";}}}
function urlEncode(url){return url.replace(/\s/g,"+").replace(/&/,"&amp;").replace(/"/,"&quot;")}
function round(n,p){if(isNaN(n))
n=parseFloat(n);if(!p||isNaN(p))
return Math.round(n);p=Math.pow(10,p);return Math.round(n*p)/p;}
function price_format(price,thousand_delim,decimal_delim,precision){var thousand_delim=(arguments.length>1&&thousand_delim!==false)?thousand_delim:number_format_th;var decimal_delim=(arguments.length>2&&decimal_delim!==false)?decimal_delim:number_format_dec;var precision=(arguments.length>3&&precision!==false)?precision:number_format_point;if(precision>0){precision=Math.pow(10,precision);price=Math.round(price*precision)/precision;var top=Math.floor(price);var bottom=Math.round((price-top)*precision)+precision;}else{var top=Math.round(price);var bottom=0;}
top=top+"";bottom=bottom+"";var cnt=0;for(var x=top.length;x>=0;x--){if(cnt%3==0&&cnt>0&&x>0)
top=top.substr(0,x)+thousand_delim+top.substr(x,top.length);cnt++;}
return(bottom>0)?(top+decimal_delim+bottom.substr(1,bottom.length)):top;}
function substitute(lbl){var x,rg;for(x=1;x<arguments.length;x+=2){if(arguments[x]&&arguments[x+1]){rg=new RegExp("\\{\\{"+arguments[x]+"\\}\\}","gi");lbl=lbl.replace(rg,arguments[x+1]);rg=new RegExp('~~'+arguments[x]+'~~',"gi");lbl=lbl.replace(rg,arguments[x+1]);}}
return lbl;}
function getWindowOutWidth(w){if(!w)
w=window;if(localBFamily=="MSIE")
return w.document.body.clientWidth;else
return w.outerWidth;}
function getWindowOutHeight(w){if(!w)
w=window;if(localBFamily=="MSIE")
return w.document.body.clientHeight;else
return w.outerHeight;}
function getWindowWidth(w){if(!w)
w=window;if(localBFamily=="MSIE")
return w.document.body.clientWidth;else
return w.innerWidth;}
function getWindowHeight(w){if(!w)
w=window;if(localBFamily=="MSIE")
return w.document.body.clientHeight;else
return w.innerHeight;}
function getDocumentHeight(w){if(!w)
w=window;if(localBFamily=="MSIE"||(localBFamily=="Opera"&&localVersion>=7&&localVersion<8))
return isStrict?w.document.documentElement.scrollHeight:w.document.body.scrollHeight;if(localBFamily=="NC")
return w.document.height
if(localBFamily=="Opera")
return w.document.body.style.pixelHeight}
function getDocumentWidth(w){if(!w)
w=window;if(localBFamily=="MSIE"||(localBFamily=="Opera"&&localVersion>=7&&localVersion<8))
return isStrict?w.document.documentElement.scrollWidth:w.document.body.scrollWidth;if(localBFamily=="NC")
return w.document.width;if(localBFamily=="Opera")
return w.document.body.style.pixelWidth;}
function expandWindowX(w,step,limit){if(!w)
w=window;if(!step)
step=10;var go=true;var i=200;while(go&&i--){if(limit&&getWindowOutWidth()+step>limit)
break;try{w.scrollTo(step,0);go=(w.document.documentElement&&w.document.documentElement.scrollLeft>0)||(w.document.body&&w.document.body.scrollLeft>0);if(go)
w.resizeBy(step,0);}catch(e){return false;}}
return true;}
function expandWindowY(w,step,limit){if(!w)
w=window;if(!step)
step=10;var go=true;var i=200;while(go&&i--){if(limit&&getWindowOutHeight()+step>limit)
break;try{w.scrollTo(0,step);go=(w.document.documentElement&&w.document.documentElement.scrollTop>0)||(w.document.body&&w.document.body.scrollTop>0);if(go)
w.resizeBy(0,step);}catch(e){return false;}}
return true;}
function checkMarks(form,reg,lbl){var is_exist=false;if(form.elements.length==0)
return true;for(var x=0;x<form.elements.length;x++){if(form.elements[x].name.search(reg)==0&&form.elements[x].type=='checkbox'&&!form.elements[x].disabled){is_exist=true;if(form.elements[x].checked)
return true;}}
if(!is_exist)
return true;else if(lbl)
alert(lbl);else if(lbl_no_items_have_been_selected)
alert(lbl_no_items_have_been_selected);return false;}
function submitForm(formObj,formMode){if(!formObj)
return false;if(formObj.tagName!="FORM"){if(!formObj.form)
return false;formObj=formObj.form;}
if(formObj.mode)
formObj.mode.value=formMode;formObj.submit();}
function sleep(msec){var then=new Date().getTime()+msec;while(then>=new Date().getTime()){}}
function convert_number(num){var regDec=new RegExp(reg_quote(number_format_dec),"gi");var regTh=new RegExp(reg_quote(number_format_th),"gi");var pow=Math.pow(10,parseInt(number_format_point));num=parseFloat(num.replace(" ","").replace(regTh,"").replace(regDec,"."));return Math.round(num*pow)/pow;}
function check_is_number(num){var regDec=new RegExp(reg_quote(number_format_dec),"gi");var regTh=new RegExp(reg_quote(number_format_th),"gi");num=num.replace(" ","").replace(regTh,"").replace(regDec,".");return(num.search(/^[+-]?[0-9]+(\.[0-9]+)?$/)!=-1);}
function reg_quote(s){return s.replace(/\./g,"\\.").replace(/\//g,"\\/").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\[/g,"\\[").replace(/\]/g,"\\]");}
function setCookie(name,value,path,expires){if(typeof(expires)=='object'){try{var days=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];var months=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];if(days[expires.getDay()]&&months[expires.getMonth()])
expires=days[expires.getDay()]+" "+expires.getDate()+"-"+months[expires.getMonth()]+"-"+expires.getFullYear()+" "+expires.getHours()+":"+expires.getMinutes()+":"+expires.getSeconds()+" GMT";}catch(e){}}
if(typeof(expires)!='string')
expires=false;document.cookie=name+"="+escape(value)+(expires?"; expires="+expires:"")+(path?"; path="+path:"");}
function deleteCookie(name){document.cookie=name+"=0; expires=Fri, 31 Dec 1999 23:59:59 GMT;";}
function cloneObject(orig){var r={};for(var i in orig){r[i]=orig[i];}
return r;}
function getFirstCB(form,reg){while(form.tagName&&form.tagName.toUpperCase()!='FORM')
form=form.parentNode;if(!form.tagName||form.tagName.toUpperCase()!='FORM'||form.elements.length==0)
return false;var selectedChk=false;for(var x=0;x<form.elements.length;x++){if(form.elements[x].name.search(reg)==0&&form.elements[x].type=='checkbox'&&!form.elements[x].disabled&&form.elements[x].checked){selectedChk=form.elements[x];break;}}
if(!selectedChk){if(lbl_no_items_have_been_selected)
alert(lbl_no_items_have_been_selected);return false;}
return selectedChk;}
function _getById(id){if(typeof(id)!='string'||!id)
return false;var obj=document.getElementById(id);if(obj&&obj.id!=id){obj=false;for(var i=0;i<document.all.length&&obj===false;i++){if(document.all[i].id==id)
obj=document.all[i];}}
return obj;}
function isset(obj){return typeof(obj)!='undefined'&&obj!==null;}
function isFunction(f){return(typeof(f)=='function'||(typeof(f)=='object'&&(f+"").search(/\s*function /)===0));}
function getPureLength(text){return(text&&text.replace)?text.replace(new RegExp("\r","g"),'').length:-1;}
function getTASelection(t){if(document.selection){t.focus();var sel1=document.selection.createRange();var sel2=sel1.duplicate();sel2.moveToElementText(t);var selText=sel1.text;var c=String.fromCharCode(1);sel1.text=c;var index=sel2.text.indexOf(c);t.selectionStart=getPureLength((index==-1)?sel2.text:sel2.text.substring(0,index));t.selectionEnd=getPureLength(selText)+t.selectionStart;sel1.moveStart('character',-1);sel1.text=selText;}
return[t.selectionStart,t.selectionEnd];}
function insert2TA(t,str){var pos=getTASelection(t);var p;if(!isNaN(pos[0])){t.value=t.value.substr(0,pos[0])+str+t.value.substr(pos[0]);p=pos[0];}else{p=getPureLength(t.value);t.value+=str;}
setTACursorPos(t,p);return p;}
function setTACursorPos(t,begin,end){if(!t||!t.tagName||t.tagName.toUpperCase()!='TEXTAREA')
return false;if(isNaN(begin)){begin=0;}else if(getPureLength(t.value)<begin){begin=getPureLength(t.value);end=begin;}
if(isNaN(end))
end=begin;if(document.selection){var sel=t.createTextRange();sel.collapse(true);sel.moveStart('character',begin);sel.moveEnd('character',end-begin);sel.select();}else if(!isNaN(t.selectionStart)){t.selectionStart=begin;t.selectionEnd=end;}
if(t.focus)
t.focus();return true;}
var Shadowbox={};Shadowbox.lib=function(){var styleCache={};var camelRe=/(-[a-z])/gi;var camelFn=function(m,a){return a.charAt(1).toUpperCase();};var toCamel=function(style){var camel;if(!(camel=styleCache[style])){camel=styleCache[style]=style.replace(camelRe,camelFn);}
return camel;};var view=document.defaultView;var alphaRe=/alpha\([^\)]*\)/gi;var setOpacity=function(el,opacity){var s=el.style;if(window.ActiveXObject){s.zoom=1;s.filter=(s.filter||'').replace(alphaRe,'')+
(opacity==1?'':' alpha(opacity='+(opacity*100)+')');}else{s.opacity=opacity;}};return{adapter:'standalone',getStyle:function(){return view&&view.getComputedStyle?function(el,style){var v,cs,camel;if(style=='float')style='cssFloat';if(v=el.style[style])return v;if(cs=view.getComputedStyle(el,'')){return cs[toCamel(style)];}
return null;}:function(el,style){var v,cs,camel;if(style=='opacity'){if(typeof el.style.filter=='string'){var m=el.style.filter.match(/alpha\(opacity=(.+)\)/i);if(m){var fv=parseFloat(m[1]);if(!isNaN(fv))return(fv?fv/100:0);}}
return 1;}else if(style=='float'){style='styleFloat';}
var camel=toCamel(style);if(v=el.style[camel])return v;if(cs=el.currentStyle)return cs[camel];return null;};}(),setStyle:function(el,style,value){if(typeof style=='string'){var camel=toCamel(style);if(camel=='opacity'){setOpacity(el,value);}else{el.style[camel]=value;}}else{for(var s in style){this.setStyle(el,s,style[s]);}}},get:function(el){return typeof el=='string'?document.getElementById(el):el;},remove:function(el){el.parentNode.removeChild(el);},getTarget:function(e){var t=e.target?e.target:e.srcElement;return t.nodeType==3?t.parentNode:t;},getPageXY:function(e){var x=e.pageX||(e.clientX+
(document.documentElement.scrollLeft||document.body.scrollLeft));var y=e.pageY||(e.clientY+
(document.documentElement.scrollTop||document.body.scrollTop));return[x,y];},preventDefault:function(e){if(e.preventDefault){e.preventDefault();}else{e.returnValue=false;}},keyCode:function(e){return e.which?e.which:e.keyCode;},addEvent:function(el,name,handler){if(el.addEventListener){el.addEventListener(name,handler,false);}else if(el.attachEvent){el.attachEvent('on'+name,handler);}},removeEvent:function(el,name,handler){if(el.removeEventListener){el.removeEventListener(name,handler,false);}else if(el.detachEvent){el.detachEvent('on'+name,handler);}},append:function(el,html){if(el.insertAdjacentHTML){el.insertAdjacentHTML('BeforeEnd',html);}else if(el.lastChild){var range=el.ownerDocument.createRange();range.setStartAfter(el.lastChild);var frag=range.createContextualFragment(html);el.appendChild(frag);}else{el.innerHTML=html;}}};}();
if(typeof Shadowbox=='undefined'){throw'Unable to load Shadowbox, no base library adapter found';}
(function(){var version='2.0';var options={animate:true,animateFade:true,animSequence:'wh',flvPlayer:'flvplayer.swf',modal:false,overlayColor:'#000',overlayOpacity:0.8,flashBgColor:'#000000',autoplayMovies:true,showMovieControls:true,slideshowDelay:0,resizeDuration:0.55,fadeDuration:0.35,displayNav:true,continuous:false,displayCounter:true,counterType:'skip',counterLimit:10,counterHeight:40,viewportPadding:20,handleOversize:'resize',handleException:null,handleUnsupported:'link',initialHeight:160,initialWidth:320,enableKeys:true,onOpen:null,onFinish:null,onChange:null,onClose:null,skipSetup:false,errors:{fla:{name:'Flash',url:'http://www.adobe.com/products/flashplayer/'},qt:{name:'QuickTime',url:'http://www.apple.com/quicktime/download/'},wmp:{name:'Windows Media Player',url:'http://www.microsoft.com/windows/windowsmedia/'},f4m:{name:'Flip4Mac',url:'http://www.flip4mac.com/wmv_download.htm'}},ext:{img:['png','jpg','jpeg','gif','bmp'],swf:['swf'],flv:['flv'],qt:['dv','mov','moov','movie','mp4'],wmp:['asf','wm','wmv'],qtwmp:['avi','mpg','mpeg'],iframe:['asp','aspx','cgi','cfm','htm','html','pl','php','php3','php4','php5','phtml','rb','rhtml','shtml','txt','vbs']}};var SB=Shadowbox;var SL=SB.lib;var default_options;var RE={domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var gallery;var current;var content;var content_id='shadowbox_content';var dims;var initialized=false;var activated=false;var slide_timer;var slide_start;var slide_delay=0;var ua=navigator.userAgent.toLowerCase();var client={isStrict:document.compatMode=='CSS1Compat',isOpera:ua.indexOf('opera')>-1,isIE:ua.indexOf('msie')>-1,isIE7:ua.indexOf('msie 7')>-1,isSafari:/webkit|khtml/.test(ua),isWindows:ua.indexOf('windows')!=-1||ua.indexOf('win32')!=-1,isMac:ua.indexOf('macintosh')!=-1||ua.indexOf('mac os x')!=-1,isLinux:ua.indexOf('linux')!=-1};client.isBorderBox=client.isIE&&!client.isStrict;client.isSafari3=client.isSafari&&!!(document.evaluate);client.isGecko=ua.indexOf('gecko')!=-1&&!client.isSafari;var ltIE7=client.isIE&&!client.isIE7;var plugins;if(navigator.plugins&&navigator.plugins.length){var detectPlugin=function(plugin_name){var detected=false;for(var i=0,len=navigator.plugins.length;i<len;++i){if(navigator.plugins[i].name.indexOf(plugin_name)>-1){detected=true;break;}}
return detected;};var f4m=detectPlugin('Flip4Mac');plugins={fla:detectPlugin('Shockwave Flash'),qt:detectPlugin('QuickTime'),wmp:!f4m&&detectPlugin('Windows Media'),f4m:f4m};}else{var detectPlugin=function(plugin_name){var detected=false;try{var axo=new ActiveXObject(plugin_name);if(axo)detected=true;}catch(e){}
return detected;};plugins={fla:detectPlugin('ShockwaveFlash.ShockwaveFlash'),qt:detectPlugin('QuickTime.QuickTime'),wmp:detectPlugin('wmplayer.ocx'),f4m:false};}
var apply=function(o,e){for(var p in e)o[p]=e[p];return o;};var isLink=function(el){return el&&typeof el.tagName=='string'&&(el.tagName.toUpperCase()=='A'||el.tagName.toUpperCase()=='AREA');};SL.getViewportHeight=function(){var h=window.innerHeight;var mode=document.compatMode;if((mode||client.isIE)&&!client.isOpera){h=client.isStrict?document.documentElement.clientHeight:document.body.clientHeight;}
return h;};SL.getViewportWidth=function(){var w=window.innerWidth;var mode=document.compatMode;if(mode||client.isIE){w=client.isStrict?document.documentElement.clientWidth:document.body.clientWidth;}
return w;};SL.createHTML=function(obj){var html='<'+obj.tag;for(var attr in obj){if(attr=='tag'||attr=='html'||attr=='children')continue;if(attr=='cls'){html+=' class="'+obj['cls']+'"';}else{html+=' '+attr+'="'+obj[attr]+'"';}}
if(RE.empty.test(obj.tag)){html+='/>';}else{html+='>';var cn=obj.children;if(cn){for(var i=0,len=cn.length;i<len;++i){html+=this.createHTML(cn[i]);}}
if(obj.html)html+=obj.html;html+='</'+obj.tag+'>';}
return html;};var ease=function(x){return 1+Math.pow(x-1,3);};var animate=function(el,p,to,d,cb){var from=parseFloat(SL.getStyle(el,p));if(isNaN(from))from=0;if(from==to){if(typeof cb=='function')cb();return;}
var delta=to-from;var op=p=='opacity';var unit=op?'':'px';var fn=function(ease){SL.setStyle(el,p,from+ease*delta+unit);};if(!options.animate&&!op||op&&!options.animateFade){fn(1);if(typeof cb=='function')cb();return;}
d*=1000;var begin=new Date().getTime();var end=begin+d;var timer=setInterval(function(){var time=new Date().getTime();if(time>=end){clearInterval(timer);fn(1);if(typeof cb=='function')cb();}else{fn(ease((time-begin)/d));}},10);};var clearOpacity=function(el){var s=el.style;if(client.isIE){if(typeof s.filter=='string'&&(/alpha/i).test(s.filter)){s.filter=s.filter.replace(/[\w\.]*alpha\(.*?\);?/i,'');}}else{s.opacity='';s['-moz-opacity']='';s['-khtml-opacity']='';}};var getComputedHeight=function(el){var h=Math.max(el.offsetHeight,el.clientHeight);if(!h){h=parseInt(SL.getStyle(el,'height'),10)||0;if(!client.isBorderBox){h+=parseInt(SL.getStyle(el,'padding-top'),10)
+parseInt(SL.getStyle(el,'padding-bottom'),10)
+parseInt(SL.getStyle(el,'border-top-width'),10)
+parseInt(SL.getStyle(el,'border-bottom-width'),10);}}
return h;};var getPlayer=function(url){var m=url.match(RE.domain);var d=m&&document.domain==m[1];if(url.indexOf('#')>-1&&d)return'inline';var q=url.indexOf('?');if(q>-1)url=url.substring(0,q);if(RE.img.test(url))return'img';if(RE.swf.test(url))return plugins.fla?'swf':'unsupported-swf';if(RE.flv.test(url))return plugins.fla?'flv':'unsupported-flv';if(RE.qt.test(url))return plugins.qt?'qt':'unsupported-qt';if(RE.wmp.test(url)){if(plugins.wmp)return'wmp';if(plugins.f4m)return'qt';if(client.isMac)return plugins.qt?'unsupported-f4m':'unsupported-qtf4m';return'unsupported-wmp';}else if(RE.qtwmp.test(url)){if(plugins.qt)return'qt';if(plugins.wmp)return'wmp';return client.isMac?'unsupported-qt':'unsupported-qtwmp';}else if(!d||RE.iframe.test(url)){return'iframe';}
return'unsupported';};var handleClick=function(ev){var link;if(isLink(this)){link=this;}else{link=SL.getTarget(ev);while(!isLink(link)&&link.parentNode){link=link.parentNode;}}
if(link){SB.open(link);if(gallery.length)SL.preventDefault(ev);}};var toggleNav=function(id,on){var el=SL.get('shadowbox_nav_'+id);if(el)el.style.display=on?'':'none';};var buildBars=function(cb){var obj=gallery[current];var title_i=SL.get('shadowbox_title_inner');title_i.innerHTML=obj.title||'';var nav=SL.get('shadowbox_nav');if(nav){var c,n,pl,pa,p;if(options.displayNav){c=true;var len=gallery.length;if(len>1){if(options.continuous){n=p=true;}else{n=(len-1)>current;p=current>0;}}
if(options.slideshowDelay>0&&hasNext()){pa=slide_timer!='paused';pl=!pa;}}else{c=n=pl=pa=p=false;}
toggleNav('close',c);toggleNav('next',n);toggleNav('play',pl);toggleNav('pause',pa);toggleNav('previous',p);}
var counter=SL.get('shadowbox_counter');if(counter){var co='';if(options.displayCounter&&gallery.length>1){if(options.counterType=='skip'){var i=0,len=gallery.length,end=len;while(i!=end){if(i==len)i=0;co+='<a onclick="Shadowbox.change('+i+');"';if(gallery[i].player=='img'){co+='><img src="'+gallery[i].source+'" height="'+options.counterHeight+'" alt=""';if(i==current)co+=' class="shadowbox_counter_current"';co+='/></a>';i++;}else{if(i==current)co+=' class="shadowbox_counter_current"';co+='>'+(++i)+'</a>';}}}else{co=(current+1)+' '+SB.LANG.of+' '+len;}}
counter.innerHTML=co;counter.style.height=options.counterHeight+"px";}
cb();};var hideBars=function(anim,cb){var obj=gallery[current];var title=SL.get('shadowbox_title');var info=SL.get('shadowbox_info');var title_i=SL.get('shadowbox_title_inner');var info_i=SL.get('shadowbox_info_inner');var fn=function(){buildBars(cb);};var title_h=getComputedHeight(title);var info_h=getComputedHeight(info)*-1;if(anim){animate(title_i,'margin-top',title_h,0.35);animate(info_i,'margin-top',info_h,0.35,fn);}else{SL.setStyle(title_i,'margin-top',title_h+'px');SL.setStyle(info_i,'margin-top',info_h+'px');fn();}};var showBars=function(cb){var title_i=SL.get('shadowbox_title_inner');var info_i=SL.get('shadowbox_info_inner');var t=title_i.innerHTML!='';if(t)animate(title_i,'margin-top',0,0.35);animate(info_i,'margin-top',0,0.35,cb);};var loadContent=function(){var obj=gallery[current];if(!obj)return;var changing=false;if(content){content.remove();changing=true;}
var p=obj.player=='inline'?'html':obj.player;if(typeof SB[p]!='function'){SB.raise('Unknown player '+obj.player);}
content=new SB[p](content_id,obj);listenKeys(false);toggleLoading(true);hideBars(changing,function(){if(!content)return;if(!changing){SL.get('shadowbox').style.display='';}
var fn=function(){resizeContent(function(){if(!content)return;showBars(function(){if(!content)return;SL.get('shadowbox_body_inner').innerHTML=SL.createHTML(content.markup(dims));toggleLoading(false,function(){if(!content)return;if(typeof content.onLoad=='function'){content.onLoad();}
if(options.onFinish&&typeof options.onFinish=='function'){options.onFinish(gallery[current]);}
if(slide_timer!='paused'){SB.play();}
listenKeys(true);});});});};if(typeof content.ready!='undefined'){var id=setInterval(function(){if(content){if(content.ready){clearInterval(id);id=null;fn();}}else{clearInterval(id);id=null;}},100);}else{fn();}});if(gallery.length>1){var next=gallery[current+1]||gallery[0];if(next.player=='img'){var a=new Image();a.src=next.content;}
var prev=gallery[current-1]||gallery[gallery.length-1];if(prev.player=='img'){var b=new Image();b.src=prev.content;}}};var setDimensions=function(height,width,resizable){resizable=resizable||false;var sb=SL.get('shadowbox_body');var h=height=parseInt(height);var w=width=parseInt(width);var view_h=SL.getViewportHeight();var view_w=SL.getViewportWidth();var border_w=parseInt(SL.getStyle(sb,'border-left-width'),10)
+parseInt(SL.getStyle(sb,'border-right-width'),10);var extra_w=border_w+2*options.viewportPadding;if(w+extra_w>=view_w){w=view_w-extra_w;}
var border_h=parseInt(SL.getStyle(sb,'border-top-width'),10)
+parseInt(SL.getStyle(sb,'border-bottom-width'),10);var bar_h=getComputedHeight(SL.get('shadowbox_title'))
+getComputedHeight(SL.get('shadowbox_info'))+getComputedHeight(SL.get('shadowbox_counter'));var extra_h=border_h+2*options.viewportPadding+bar_h;if(h+extra_h>=view_h){h=view_h-extra_h;}
var drag=false;var resize_h=height;var resize_w=width;var handle=options.handleOversize;if(resizable&&(handle=='resize'||handle=='drag')){var change_h=(height-h)/height;var change_w=(width-w)/width;if(handle=='resize'){if(change_h>change_w){w=Math.round((width/height)*h);}else if(change_w>change_h){h=Math.round((height/width)*w);}
resize_w=w;resize_h=h;}else{var link=gallery[current];if(link)drag=link.player=='img'&&(change_h>0||change_w>0);}}
dims={height:h+border_h+bar_h,width:w+border_w,inner_h:h,inner_w:w,top:(view_h-(h+extra_h))/2+options.viewportPadding,resize_h:resize_h,resize_w:resize_w,drag:drag};};var resizeContent=function(cb){if(!content)return;setDimensions(content.height,content.width,content.resizable);if(cb){switch(options.animSequence){case'hw':adjustHeight(dims.inner_h,dims.top,true,function(){adjustWidth(dims.width,true,cb);});break;case'wh':adjustWidth(dims.width,true,function(){adjustHeight(dims.inner_h,dims.top,true,cb);});break;case'sync':default:adjustWidth(dims.width,true);adjustHeight(dims.inner_h,dims.top,true,cb);}}else{adjustWidth(dims.width,false);adjustHeight(dims.inner_h,dims.top,false);var c=SL.get(content_id);if(c){if(content.resizable&&options.handleOversize=='resize'){c.height=dims.resize_h;c.width=dims.resize_w;}
if(gallery[current].player=='img'&&options.handleOversize=='drag'){var top=parseInt(SL.getStyle(c,'top'));if(top+content.height<dims.inner_h){SL.setStyle(c,'top',dims.inner_h-content.height+'px');}
var left=parseInt(SL.getStyle(c,'left'));if(left+content.width<dims.inner_w){SL.setStyle(c,'left',dims.inner_w-content.width+'px');}}}}};var adjustHeight=function(height,top,anim,cb){height=parseInt(height);var sb=SL.get('shadowbox_body');if(anim){animate(sb,'height',height,options.resizeDuration);}else{SL.setStyle(sb,'height',height+'px');}
var s=SL.get('shadowbox');if(anim){animate(s,'top',top,options.resizeDuration,cb);}else{SL.setStyle(s,'top',top+'px');if(typeof cb=='function')cb();}};var adjustWidth=function(width,anim,cb){width=parseInt(width);var s=SL.get('shadowbox');if(anim){animate(s,'width',width,options.resizeDuration,cb);}else{SL.setStyle(s,'width',width+'px');if(typeof cb=='function')cb();}};var listenKeys=function(on){if(!options.enableKeys)return;SL[(on?'add':'remove')+'Event'](document,'keydown',handleKey);};var handleKey=function(e){var code=SL.keyCode(e);SL.preventDefault(e);if(code==81||code==88||code==27){SB.close();}else if(code==37){SB.previous();}else if(code==39){SB.next();}else if(code==32){SB[(typeof slide_timer=='number'?'pause':'play')]();}};var toggleLoading=function(on,cb){var loading=SL.get('shadowbox_loading');if(on){loading.style.display='';if(typeof cb=='function')cb();}else{var p=gallery[current].player;var anim=(p=='img'||p=='html');var fn=function(){loading.style.display='none';clearOpacity(loading);if(typeof cb=='function')cb();};if(anim){animate(loading,'opacity',0,options.fadeDuration,fn);}else{fn();}}};var fixTop=function(){SL.get('shadowbox_container').style.top=document.documentElement.scrollTop+'px';};var fixHeight=function(){SL.get('shadowbox_overlay').style.height=SL.getViewportHeight()+'px';};var hasNext=function(){return gallery.length>1&&(current!=gallery.length-1||options.continuous);};var toggleVisible=function(cb){var els,v=(cb)?'hidden':'visible';var hide=['select','object','embed'];for(var i=0;i<hide.length;++i){els=document.getElementsByTagName(hide[i]);for(var j=0,len=els.length;j<len;++j){els[j].style.visibility=v;}}
var so=SL.get('shadowbox_overlay');var sc=SL.get('shadowbox_container');var sb=SL.get('shadowbox');if(cb){SL.setStyle(so,{backgroundColor:options.overlayColor,opacity:0});if(!options.modal)SL.addEvent(so,'click',SB.close);if(ltIE7){fixTop();fixHeight();SL.addEvent(window,'scroll',fixTop);}
sb.style.display='none';sc.style.visibility='visible';animate(so,'opacity',parseFloat(options.overlayOpacity),options.fadeDuration,cb);}else{SL.removeEvent(so,'click',SB.close);if(ltIE7)SL.removeEvent(window,'scroll',fixTop);sb.style.display='none';animate(so,'opacity',0,options.fadeDuration,function(){sc.style.visibility='hidden';sb.style.display='';clearOpacity(so);});}};Shadowbox.init=function(opts){if(initialized)return;if(typeof SB.LANG=='undefined'){SB.raise('No Shadowbox language loaded');return;}
if(typeof SB.SKIN=='undefined'){SB.raise('No Shadowbox skin loaded');return;}
apply(options,opts||{});var markup=SB.SKIN.markup.replace(/\{(\w+)\}/g,function(m,p){return SB.LANG[p];});var bd=document.body||document.documentElement;SL.append(bd,markup);if(ltIE7){SL.setStyle(SL.get('shadowbox_container'),'position','absolute');SL.get('shadowbox_body').style.zoom=1;var png=SB.SKIN.png_fix;if(png&&png.constructor==Array){for(var i=0;i<png.length;++i){var el=SL.get(png[i]);if(el){var match=SL.getStyle(el,'background-image').match(/url\("(.*\.png)"\)/);if(match){SL.setStyle(el,{backgroundImage:'none',filter:'progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src='+match[1]+',sizingMethod=scale);'});}}}}}
for(var e in options.ext){RE[e]=new RegExp('\.('+options.ext[e].join('|')+')\s*$','i');}
var id;SL.addEvent(window,'resize',function(){if(id){clearTimeout(id);id=null;}
id=setTimeout(function(){if(ltIE7)fixHeight();resizeContent();},50);});if(!options.skipSetup)SB.setup();initialized=true;};Shadowbox.loadSkin=function(skin,dir){if(!(/\/$/.test(dir)))dir+='/';skin=dir+skin+'/';document.write('<link rel="stylesheet" type="text/css" href="'+skin+'skin.css">');document.write('<scr'+'ipt type="text/javascript" src="'+skin+'skin.js"><\/script>');};Shadowbox.loadLanguage=function(lang,dir){if(!(/\/$/.test(dir)))dir+='/';document.write('<scr'+'ipt type="text/javascript" src="'+dir+'shadowbox-'+lang+'.js"><\/script>');};Shadowbox.loadPlayer=function(players,dir){if(typeof players=='string')players=[players];if(!(/\/$/.test(dir)))dir+='/';for(var i=0,len=players.length;i<len;++i){document.write('<scr'+'ipt type="text/javascript" src="'+dir+'shadowbox-'+players[i]+'.js"><\/script>');}};Shadowbox.setup=function(links,opts){if(!links){var links=[];var a=document.getElementsByTagName('a'),rel;for(var i=0,len=a.length;i<len;++i){rel=a[i].getAttribute('rel');if(rel&&RE.rel.test(rel))links[links.length]=a[i];}}else if(!links.length){links=[links];}
var link;for(var i=0,len=links.length;i<len;++i){link=links[i];if(typeof link.shadowboxCacheKey=='undefined'){link.shadowboxCacheKey=cache.length;SL.addEvent(link,'click',handleClick);}
cache[link.shadowboxCacheKey]=this.buildCacheObj(link,opts);}};Shadowbox.buildCacheObj=function(link,opts){var href=link.href;var src=href;var childrens=link.childNodes;var i=0;while(i<link.childNodes.length){var child=link.childNodes.item(i);if(child.tagName=="IMG"){src=child.src;}
i++;}
var o={el:link,title:link.getAttribute('title'),player:getPlayer(href),options:apply({},opts||{}),content:href,source:src};var opt,l_opts=['player','title','height','width','gallery'];for(var i=0,len=l_opts.length;i<len;++i){opt=l_opts[i];if(typeof o.options[opt]!='undefined'){o[opt]=o.options[opt];delete o.options[opt];}}
var rel=link.getAttribute('rel');if(rel){var match=rel.match(RE.gallery);if(match)o.gallery=escape(match[2]);var params=rel.split(';');for(var i=0,len=params.length;i<len;++i){match=params[i].match(RE.param);if(match){if(match[1]=='options'){eval('apply(o.options, '+match[2]+')');}else{o[match[1]]=match[2];}}}}
return o;};Shadowbox.applyOptions=function(opts){if(opts){default_options=apply({},options);options=apply(options,opts);}};Shadowbox.revertOptions=function(){if(default_options){options=default_options;default_options=null;}};Shadowbox.open=function(obj,opts){this.revertOptions();if(isLink(obj)){if(typeof obj.shadowboxCacheKey=='undefined'||typeof cache[obj.shadowboxCacheKey]=='undefined'){obj=this.buildCacheObj(obj,opts);}else{obj=cache[obj.shadowboxCacheKey];}}
if(obj.constructor==Array){gallery=obj;current=0;}else{var copy=apply({},obj);if(!obj.gallery){gallery=[copy];current=0;}else{current=null;gallery=[];var ci;for(var i=0,len=cache.length;i<len;++i){ci=cache[i];if(ci.gallery){if(ci.content==obj.content&&ci.gallery==obj.gallery&&ci.title==obj.title){current=gallery.length;}
if(ci.gallery==obj.gallery){gallery.push(apply({},ci));}}}
if(current==null){gallery.unshift(copy);current=0;}}}
obj=gallery[current];if(obj.options||opts){this.applyOptions(apply(apply({},obj.options||{}),opts||{}));}
var match,r;for(var i=0,len=gallery.length;i<len;++i){r=false;if(gallery[i].player=='unsupported'){r=true;}else if(match=RE.unsupported.exec(gallery[i].player)){if(options.handleUnsupported=='link'){gallery[i].player='html';var s,a,oe=options.errors;switch(match[1]){case'qtwmp':s='either';a=[oe.qt.url,oe.qt.name,oe.wmp.url,oe.wmp.name];break;case'qtf4m':s='shared';a=[oe.qt.url,oe.qt.name,oe.f4m.url,oe.f4m.name];break;default:s='single';if(match[1]=='swf'||match[1]=='flv')match[1]='fla';a=[oe[match[1]].url,oe[match[1]].name];}
var msg=SB.LANG.errors[s].replace(/\{(\d+)\}/g,function(m,i){return a[i];});gallery[i].content='<div class="shadowbox_message">'+msg+'</div>';}else{r=true;}}else if(gallery[i].player=='inline'){var match=RE.inline.exec(gallery[i].content);if(match){var el;if(el=SL.get(match[1])){gallery[i].content=el.innerHTML;}else{SB.raise('Cannot find element with id '+match[1]);}}else{SB.raise('Cannot find element id for inline content');}}
if(r){gallery.splice(i,1);if(i<current){--current;}else if(i==current){current=i>0?current-1:i;}
--i;len=gallery.length;}}
if(gallery.length){if(options.onOpen&&typeof options.onOpen=='function'){options.onOpen(obj);}
if(!activated){setDimensions(options.initialHeight,options.initialWidth);adjustHeight(dims.inner_h,dims.top,false);adjustWidth(dims.width,false);toggleVisible(loadContent);}else{loadContent();}
activated=true;}};Shadowbox.change=function(num){if(!gallery)return;if(!gallery[num]){if(!options.continuous){return;}else{num=num<0?(gallery.length-1):0;}}
if(typeof slide_timer=='number'){clearTimeout(slide_timer);slide_timer=null;slide_delay=slide_start=0;}
current=num;if(options.onChange&&typeof options.onChange=='function'){options.onChange(gallery[current]);}
loadContent();};Shadowbox.next=function(){this.change(current+1);};Shadowbox.previous=function(){this.change(current-1);};Shadowbox.play=function(){if(!hasNext())return;if(!slide_delay)slide_delay=options.slideshowDelay*1000;if(slide_delay){slide_start=new Date().getTime();slide_timer=setTimeout(function(){slide_delay=slide_start=0;SB.next();},slide_delay);toggleNav('play',false);toggleNav('pause',true);}};Shadowbox.pause=function(){if(typeof slide_timer=='number'){var time=new Date().getTime();slide_delay=Math.max(0,slide_delay-(time-slide_start));if(slide_delay){clearTimeout(slide_timer);slide_timer='paused';}
toggleNav('pause',false);toggleNav('play',true);}};Shadowbox.close=function(){if(!activated)return;listenKeys(false);toggleVisible(false);if(content){content.remove();content=null;}
if(typeof slide_timer=='number')clearTimeout(slide_timer);slide_timer=null;slide_delay=0;if(options.onClose&&typeof options.onClose=='function'){options.onClose(gallery[current]);}
activated=false;};Shadowbox.clearCache=function(){for(var i=0,len=cache.length;i<len;++i){if(cache[i].el){SL.removeEvent(cache[i].el,'click',handleClick);delete cache[i].el.shadowboxCacheKey;}}
cache=[];};Shadowbox.getPlugins=function(){return plugins;};Shadowbox.getOptions=function(){return options;};Shadowbox.getCurrent=function(){return gallery[current];};Shadowbox.getVersion=function(){return version;};Shadowbox.getClient=function(){return client;};Shadowbox.getContent=function(){return content;};Shadowbox.getDimensions=function(){return dims;};Shadowbox.raise=function(e){if(typeof options.handleException=='function'){options.handleException(e);}else{throw e;}};})();/**
 * The "classic" theme markup for Shadowbox.
 *
 * This file is part of Shadowbox.
 *
 * Shadowbox is an online media viewer application that supports all of the
 * web's most popular media publishing formats. Shadowbox is written entirely
 * in JavaScript and CSS and is highly customizable. Using Shadowbox, website
 * authors can showcase a wide assortment of media in all major browsers without
 * navigating users away from the linking page.
 *
 * Shadowbox is released under version 3.0 of the Creative Commons Attribution-
 * Noncommercial-Share Alike license. This means that it is absolutely free
 * for personal, noncommercial use provided that you 1) make attribution to the
 * author and 2) release any derivative work under the same or a similar
 * license.
 *
 * If you wish to use Shadowbox for commercial purposes, licensing information
 * can be found at http://mjijackson.com/shadowbox/.
 *
 * @author      Michael J. I. Jackson <mjijackson@gmail.com>
 * @copyright   2007-2008 Michael J. I. Jackson
 * @license     http://creativecommons.org/licenses/by-nc-sa/3.0/
 * @version     SVN: $Id: skin.js 108 2008-07-11 04:19:01Z mjijackson $
 */

if(typeof Shadowbox == 'undefined'){
    throw 'Unable to load Shadowbox skin, base library not found.';
}

/**
 * The HTML markup to use for Shadowbox.
 *
 * IMPORTANT: The script depends on most of these elements being present.
 *
 * @property    {Object}    SKIN
 * @public
 * @static
 */
Shadowbox.SKIN = {

    markup:     '<div id="shadowbox_container">' +
                    '<div id="shadowbox_overlay"></div>' +
                    '<div id="shadowbox">' +
                        '<div id="shadowbox_title">' +
                            '<div id="shadowbox_title_inner"></div>' +
                        '</div>' +
/*
                        '<div id="shadowbox_info">' +
                            '<div id="shadowbox_info_inner">' +
                                '<div id="shadowbox_counter"></div>' +
                                '<div id="shadowbox_nav">' +
                                    '<a id="shadowbox_nav_close" title="{close}" onclick="Shadowbox.close()"></a>' +
                                    '<a id="shadowbox_nav_next" title="{next}" onclick="Shadowbox.next()"></a>' +
                                    '<a id="shadowbox_nav_play" title="{play}" onclick="Shadowbox.play()"></a>' +
                                    '<a id="shadowbox_nav_pause" title="{pause}" onclick="Shadowbox.pause()"></a>' +
                                    '<a id="shadowbox_nav_previous" title="{previous}" onclick="Shadowbox.previous()"></a>' +
                                '</div>' +
                                '<div class="shadowbox_clear"></div>' +
                            '</div>' +
                        '</div>' +
*/
                        '<div id="shadowbox_body">' +
                            '<div id="shadowbox_body_inner"></div>' +
                            '<div id="shadowbox_loading">' +
                                '<div id="shadowbox_loading_indicator"></div>' +
                                '<span><a onclick="Shadowbox.close();">{cancel}</a></span>' +
                            '</div>' +
                        '</div>' +
                        '<div id="shadowbox_info">' +
                            '<div id="shadowbox_info_inner">' +
//                                '<div id="shadowbox_counter"></div>' +

                                '<div id="shadowbox_nav">' +
                                    '<a id="shadowbox_nav_close" title="{close}" onclick="Shadowbox.close()"></a>' +
                                    '<a id="shadowbox_nav_next" title="{next}" onclick="Shadowbox.next()"></a>' +
                                    '<a id="shadowbox_nav_play" title="{play}" onclick="Shadowbox.play()"></a>' +
                                    '<a id="shadowbox_nav_pause" title="{pause}" onclick="Shadowbox.pause()"></a>' +
                                    '<a id="shadowbox_nav_previous" title="{previous}" onclick="Shadowbox.previous()"></a>' +
                                '</div>' +
                                '<div class="shadowbox_clear"></div>' +
                            '</div>' +
                        '</div>' +

                    '</div>' +
'<div id="shadowbox_counter"></div>'+
                '</div>',

    png_fix:    [
        'shadowbox_nav_close',
        'shadowbox_nav_next',
        'shadowbox_nav_play',
        'shadowbox_nav_pause',
        'shadowbox_nav_previous'
    ]

};

if(typeof Shadowbox=='undefined'){throw'Unable to load Shadowbox language file, base library not found.';}
Shadowbox.LANG={code:'en',of:'of',loading:'loading',cancel:'Cancel',next:'Next',previous:'Previous',play:'Play',pause:'Pause',close:'Close',errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};
(function(){var SB=Shadowbox;var SL=SB.lib;var C=SB.getClient();var drag;var draggable;var drag_id='shadowbox_drag_layer';var preloader;var resetDrag=function(){drag={x:0,y:0,start_x:null,start_y:null};};var toggleDrag=function(on,h,w){if(on){resetDrag();var styles=['position:absolute','height:'+h+'px','width:'+w+'px','cursor:'+(C.isGecko?'-moz-grab':'move'),'background-color:'+(C.isIE?'#fff;filter:alpha(opacity=0)':'transparent')];SL.append(SL.get('shadowbox_body_inner'),'<div id="'+drag_id+'" style="'+styles.join(';')+'"></div>');SL.addEvent(SL.get(drag_id),'mousedown',listenDrag);}else{var d=SL.get(drag_id);if(d){SL.removeEvent(d,'mousedown',listenDrag);SL.remove(d);}}};var listenDrag=function(e){SL.preventDefault(e);var coords=SL.getPageXY(e);drag.start_x=coords[0];drag.start_y=coords[1];draggable=SL.get('shadowbox_content');SL.addEvent(document,'mousemove',positionDrag);SL.addEvent(document,'mouseup',unlistenDrag);if(C.isGecko)SL.setStyle(SL.get(drag_id),'cursor','-moz-grabbing');};var unlistenDrag=function(){SL.removeEvent(document,'mousemove',positionDrag);SL.removeEvent(document,'mouseup',unlistenDrag);if(C.isGecko)SL.setStyle(SL.get(drag_id),'cursor','-moz-grab');};var positionDrag=function(e){var content=SB.getContent();var dims=SB.getDimensions();var coords=SL.getPageXY(e);var move_x=coords[0]-drag.start_x;drag.start_x+=move_x;drag.x=Math.max(Math.min(0,drag.x+move_x),dims.inner_w-content.width);SL.setStyle(draggable,'left',drag.x+'px');var move_y=coords[1]-drag.start_y;drag.start_y+=move_y;drag.y=Math.max(Math.min(0,drag.y+move_y),dims.inner_h-content.height);SL.setStyle(draggable,'top',drag.y+'px');};Shadowbox.img=function(id,obj){this.id=id;this.obj=obj;this.resizable=true;this.ready=false;var self=this;preloader=new Image();preloader.onload=function(){self.height=self.obj.height?parseInt(self.obj.height,10):preloader.height;self.width=self.obj.width?parseInt(self.obj.width,10):preloader.width;self.ready=true;preloader.onload='';preloader=null;};preloader.src=obj.content;};Shadowbox.img.prototype={markup:function(dims){return{tag:'img',id:this.id,height:dims.resize_h,width:dims.resize_w,src:this.obj.content,style:'position:absolute'};},onLoad:function(){var dims=SB.getDimensions();if(dims.drag&&SB.getOptions().handleOversize=='drag'){toggleDrag(true,dims.resize_h,dims.resize_w);}},remove:function(){var el=SL.get(this.id);if(el)SL.remove(el);toggleDrag(false);if(preloader){preloader.onload='';preloader=null;}}};})();
(function(){var SB=Shadowbox;var SL=SB.lib;Shadowbox.html=function(id,obj){this.id=id;this.obj=obj;this.height=this.obj.height?parseInt(this.obj.height,10):300;this.width=this.obj.width?parseInt(this.obj.width,10):500;};Shadowbox.html.prototype={markup:function(dims){return{tag:'div',id:this.id,cls:'html',html:this.obj.content};},remove:function(){var el=SL.get(this.id);if(el)SL.remove(el);}};})();
function tabberObj(argsObj)
{var arg;this.div=null;this.classMain="tabber";this.classMainLive="tabberlive";this.classTab="tabbertab";this.classTabDefault="tabbertabdefault";this.classNav="tabbernav";this.classTabHide="tabbertabhide";this.classNavActive="tabberactive";this.titleElements=['h2','h3','h4','h5','h6'];this.titleElementsStripHTML=true;this.removeTitle=true;this.addLinkId=false;this.linkIdFormat='<tabberid>nav<tabnumberone>';for(arg in argsObj){this[arg]=argsObj[arg];}
this.REclassMain=new RegExp('\\b'+this.classMain+'\\b','gi');this.REclassMainLive=new RegExp('\\b'+this.classMainLive+'\\b','gi');this.REclassTab=new RegExp('\\b'+this.classTab+'\\b','gi');this.REclassTabDefault=new RegExp('\\b'+this.classTabDefault+'\\b','gi');this.REclassTabHide=new RegExp('\\b'+this.classTabHide+'\\b','gi');this.tabs=new Array();if(this.div){this.init(this.div);this.div=null;}}
tabberObj.prototype.init=function(e)
{var
childNodes,i,i2,t,defaultTab=0,DOM_ul,DOM_li,DOM_a,aId,headingElement;if(!document.getElementsByTagName){return false;}
if(e.id){this.id=e.id;}
this.tabs.length=0;childNodes=e.childNodes;for(i=0;i<childNodes.length;i++){if(childNodes[i].className&&childNodes[i].className.match(this.REclassTab)){t=new Object();t.div=childNodes[i];this.tabs[this.tabs.length]=t;if(childNodes[i].className.match(this.REclassTabDefault)){defaultTab=this.tabs.length-1;}}}
DOM_ul=document.createElement("ul");DOM_ul.className=this.classNav;for(i=0;i<this.tabs.length;i++){t=this.tabs[i];t.headingText=t.div.title;if(this.removeTitle){t.div.title='';}
if(!t.headingText){for(i2=0;i2<this.titleElements.length;i2++){headingElement=t.div.getElementsByTagName(this.titleElements[i2])[0];if(headingElement){t.headingText=headingElement.innerHTML;if(this.titleElementsStripHTML){t.headingText.replace(/<br>/gi," ");t.headingText=t.headingText.replace(/<[^>]+>/g,"");}
break;}}}
if(!t.headingText){t.headingText=i+1;}
DOM_li=document.createElement("li");t.li=DOM_li;DOM_a=document.createElement("a");DOM_a.appendChild(document.createTextNode(t.headingText));DOM_a.href="javascript:void(null);";DOM_a.title=t.headingText;DOM_a.onclick=this.navClick;DOM_a.tabber=this;DOM_a.tabberIndex=i;if(this.addLinkId&&this.linkIdFormat){aId=this.linkIdFormat;aId=aId.replace(/<tabberid>/gi,this.id);aId=aId.replace(/<tabnumberzero>/gi,i);aId=aId.replace(/<tabnumberone>/gi,i+1);aId=aId.replace(/<tabtitle>/gi,t.headingText.replace(/[^a-zA-Z0-9\-]/gi,''));DOM_a.id=aId;}
DOM_li.appendChild(DOM_a);DOM_ul.appendChild(DOM_li);}
e.insertBefore(DOM_ul,e.firstChild);e.className=e.className.replace(this.REclassMain,this.classMainLive);this.tabShow(defaultTab);if(typeof this.onLoad=='function'){this.onLoad({tabber:this});}
return this;};tabberObj.prototype.navClick=function(event)
{var
rVal,a,self,tabberIndex,onClickArgs;a=this;if(!a.tabber){return false;}
self=a.tabber;tabberIndex=a.tabberIndex;a.blur();if(typeof self.onClick=='function'){onClickArgs={'tabber':self,'index':tabberIndex,'event':event};if(!event){onClickArgs.event=window.event;}
rVal=self.onClick(onClickArgs);if(rVal===false){return false;}}
self.tabShow(tabberIndex);return false;};tabberObj.prototype.tabHideAll=function()
{var i;for(i=0;i<this.tabs.length;i++){this.tabHide(i);}};tabberObj.prototype.tabHide=function(tabberIndex)
{var div;if(!this.tabs[tabberIndex]){return false;}
div=this.tabs[tabberIndex].div;if(!div.className.match(this.REclassTabHide)){div.className+=' '+this.classTabHide;}
this.navClearActive(tabberIndex);return this;};tabberObj.prototype.tabShow=function(tabberIndex)
{var div;if(!this.tabs[tabberIndex]){return false;}
this.tabHideAll();div=this.tabs[tabberIndex].div;div.className=div.className.replace(this.REclassTabHide,'');this.navSetActive(tabberIndex);if(typeof this.onTabDisplay=='function'){this.onTabDisplay({'tabber':this,'index':tabberIndex});}
return this;};tabberObj.prototype.navSetActive=function(tabberIndex)
{this.tabs[tabberIndex].li.className=this.classNavActive;return this;};tabberObj.prototype.navClearActive=function(tabberIndex)
{this.tabs[tabberIndex].li.className='';return this;};function tabberAutomatic(tabberArgs)
{var
tempObj,divs,i;if(!tabberArgs){tabberArgs={};}
tempObj=new tabberObj(tabberArgs);divs=document.getElementsByTagName("div");for(i=0;i<divs.length;i++){if(divs[i].className&&divs[i].className.match(tempObj.REclassMain)){tabberArgs.div=divs[i];divs[i].tabber=new tabberObj(tabberArgs);}}
return this;}
function tabberAutomaticOnLoad(tabberArgs)
{var oldOnLoad;if(!tabberArgs){tabberArgs={};}
oldOnLoad=window.onload;if(typeof window.onload!='function'){window.onload=function(){tabberAutomatic(tabberArgs);};}else{window.onload=function(){oldOnLoad();tabberAutomatic(tabberArgs);};}}
if(typeof tabberOptions=='undefined'){tabberAutomaticOnLoad();}else{if(!tabberOptions['manualStartup']){tabberAutomaticOnLoad(tabberOptions);}}
document.write('<style type="text/css">.tabber{display:none;}<\/style>');
var ga_minicart_on=true;var aatc_popup_in_shadowbox=true;var upselling_line_height=60;
var step=10;var init_scroll_pos;var dest_scroll_pos;var scr_timer;var delay=10;var steps=[[0,3],[0.04,10],[0.1,14],[0.85,9],[0.90,7],[0.95,3]];function getBodyScrollTop()
{return self.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop);}
function scroll_page(Ypos){init_scroll_pos=getBodyScrollTop();dest_scroll_pos=Ypos;scr_timer=setInterval(my_scrollBy,delay);}
function my_scrollBy(){if(scr_timer==null)return;curr_scroll_pos=getBodyScrollTop();local_step=step;scr_progress=(init_scroll_pos-curr_scroll_pos)/(init_scroll_pos-dest_scroll_pos);for(var s in steps){if(steps[s][0]>scr_progress){break;}
local_step=steps[s][1];}
if(local_step>0)
local_step=-1*local_step;window.scrollBy(0,local_step);teps=[[0,3],[0.04,10],[0.1,14],[0.85,9],[0.90,7],[0.95,3]];if(curr_scroll_pos<=dest_scroll_pos){clearInterval(scr_timer);scr_timer=null;}}
function Subsys_JsHttpRequest_Js(){this._construct()}
(function(){var COUNT=0;var PENDING={};var CACHE={};Subsys_JsHttpRequest_Js.dataReady=function(id,text,js){var undef;var th=PENDING[id];delete PENDING[id];if(th){delete th._xmlReq;if(th.caching)CACHE[th.hash]=[text,js];th._dataReady(text,js);}else if(typeof(th)!=typeof(undef)){alert("ScriptLoader: unknown pending id: "+id);}}
Subsys_JsHttpRequest_Js.prototype={onreadystatechange:null,readyState:0,responseText:null,responseXML:null,status:200,statusText:"OK",session_name:"PHPSESSID",responseJS:null,caching:false,_span:null,_id:null,_xmlReq:null,_openArg:null,_reqHeaders:null,abort:function(){if(this._xmlReq)return this._xmlReq.abort();if(this._span){this.readyState=0;if(this.onreadystatechange)this.onreadystatechange();this._cleanupScript();}},open:function(method,url,asyncFlag,username,password){this._openArg={'method':method,'url':url,'asyncFlag':asyncFlag,'username':username,'password':password};this._id=null;this._xmlReq=null;this._reqHeaders=[];return true;},send:function(content){var id=(new Date().getTime())+""+COUNT++;var query=this._hash2query(content);var url=this._openArg.url;var sid=this._getSid();if(sid)url+=(url.indexOf('?')>=0?'&':'?')+this.session_name+"="+this.escape(sid);var hash=this.hash=url+'?'+query;if(this.caching&&CACHE[hash]){var c=CACHE[hash];this._dataReady(c[0],c[1]);return false;}
this._xmlReq=this._obtainXmlReq(id,url);var hasSetHeader=this._xmlReq&&(window.ActiveXObject||this._xmlReq.setRequestHeader);var href,body;if(this._xmlReq&&hasSetHeader&&(""+this._openArg.method).toUpperCase()=="POST"){this._openArg.method="POST";href=url;body=query;}else{this._openArg.method="GET";href=url+(url.indexOf('?')>=0?'&':'?')+query;body=null;}
href=href+(href.indexOf('?')>=0?'&':'?')+id;PENDING[id]=this;if(this._xmlReq){var a=this._openArg;this._xmlReq.open(a.method,href+"-xml",a.asyncFlag,a.username,a.password);if(hasSetHeader){for(var i=0;i<this._reqHeaders.length;i++)
this._xmlReq.setRequestHeader(this._reqHeaders[i][0],this._reqHeaders[i][1]);this._xmlReq.setRequestHeader('Content-Type','application/octet-stream');}
return this._xmlReq.send(body);}else{this._obtainScript(id,href);return true;}},getAllResponseHeaders:function(){if(this._xmlReq)return this._xmlReq.getAllResponseHeaders();return'';},getResponseHeader:function(label){if(this._xmlReq)return this._xmlReq.getResponseHeader(label);return'';},setRequestHeader:function(label,value){this._reqHeaders[this._reqHeaders.length]=[label,value];},_construct:function(){},_dataReady:function(text,js){with(this){if(text!==null||js!==null){readyState=4;responseText=responseXML=text;responseJS=js;}else{readyState=0;responseText=responseXML=responseJS=null;}
if(onreadystatechange)onreadystatechange();_cleanupScript();}},_obtainXmlReq:function(id,url){if(url.match(new RegExp('^[a-z]+://','i')))return null;var req=null;if(window.XMLHttpRequest){try{req=new XMLHttpRequest()}catch(e){}}else if(window.ActiveXObject){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}
if(!req)try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}}
if(req){var th=this;req.onreadystatechange=function(){if(req.readyState==4){var responseText=req.responseText;try{eval(responseText);}catch(e){Subsys_JsHttpRequest_Js.dataReady(id,"JavaScript code generated by backend is invalid!\n"+responseText,null);}}else{th.readyState=req.readyState;if(th.onreadystatechange)th.onreadystatechange()}};this._id=id;}
return req;},_obtainScript:function(id,href){with(document){var span=null;span=body.appendChild(createElement("SPAN"));span.style.display='none';span.innerHTML='Text for stupid IE.<s'+'cript></'+'script>';setTimeout(function(){var s=span.getElementsByTagName("script")[0];s.language="JavaScript";if(s.setAttribute)s.setAttribute('src',href);else s.src=href;},10);this._id=id;this._span=span;}},_cleanupScript:function(){var span=this._span;if(span){this._span=null;setTimeout(function(){span.parentNode.removeChild(span);},50);}
return false;},_hash2query:function(content,prefix){if(prefix==null)prefix="";var query=[];if(content instanceof Object){for(var k in content){var v=content[k];if(v.constructor.prototype[k])continue;var curPrefix=prefix?prefix+'['+this.escape(k)+']':this.escape(k);if(v instanceof Object)
query[query.length]=this._hash2query(v,curPrefix);else
query[query.length]=curPrefix+"="+this.escape(v);}}else{query=[content];}
return query.join('&');},_getSid:function(){var m=document.location.search.match(new RegExp('[&?]'+this.session_name+'=([^&?]*)'));var sid=null;if(m){sid=m[1];}else{var m=document.cookie.match(new RegExp(s='(;|^)\\s*'+this.session_name+'=([^;]*)'));if(m)sid=m[2];}
return sid;},escape:function(s){return escape(s).replace(new RegExp('\\+','g'),'%2B');}}})();
var cached_img_loader=null;var alt_post_params=null;var txt='';function update_minicart_area(items,cost){if(document.getElementById('minicart_total_items')!=null)
document.getElementById('minicart_total_items').innerHTML=items;if(document.getElementById('minicart_total_items2')!=null)
document.getElementById('minicart_total_items2').innerHTML=items;if(document.getElementById('minicart_total_cost')!=null)
document.getElementById('minicart_total_cost').innerHTML=cost;if(document.getElementById('minicart_total_cost2')!=null)
document.getElementById('minicart_total_cost2').innerHTML=cost;if(document.getElementById('minicart_total_info_1')!=null)
document.getElementById('minicart_total_info_1').style.display='';if(document.getElementById('minicart_total_info_2')!=null)
document.getElementById('minicart_total_info_2').style.display='';if(document.getElementById('minicart_empty_info')!=null)
document.getElementById('minicart_empty_info').style.display='none';}
function myFinish(cacheElem){var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if(imgs[i].id.search('upsell_img_'!=-1)){imgs[i].style.display='';}}}
function f_scrollTop(){return f_filterResults(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0);}
function f_filterResults(n_win,n_docel,n_body){var n_result=n_win?n_win:0;if(n_docel&&(!n_result||(n_result>n_docel)))
n_result=n_docel;return n_body&&(!n_result||(n_result>n_body))?n_body:n_result;}
function add2cart_ajax(event_obj){var req=new Subsys_JsHttpRequest_Js();req.onreadystatechange=function(){if(req.readyState==4){if(req.responseJS!=null&&req.responseJS[0]!=null){if(req.responseJS[0]){txt=req.responseJS[0]['div_content'];document.getElementById('ajax_minicart').innerHTML=txt;document.getElementById('ajax_minicart').style.display='block';if(aatc_popup_in_shadowbox){var sh_box_height=document.getElementById('ajax_minicart').offsetHeight;document.getElementById('ajax_minicart').style.display='none';document.getElementById('ajax_minicart').innerHTML='';sh_box_height+=4+upselling_line_height*req.responseJS[0]['upselling_lines_num'];Shadowbox.open({player:'html',content:txt,options:{displayNav:false,onFinish:myFinish},height:sh_box_height,width:390});}else{m_cart_left=(document.body.clientWidth-400)/2;document.getElementById('ajax_minicart').style.left=m_cart_left+"px";m_cart_top=30+f_scrollTop();document.getElementById('ajax_minicart').style.top=m_cart_top+"px";}
update_minicart_area(req.responseJS[0]['minicart_total_items'],req.responseJS[0]['minicart_total_cost']);}else{document.getElementById('ajax_minicart').innerHTML='';document.getElementById('ajax_minicart').style.display='none';}}else{document.getElementById('ajax_minicart').innerHTML='';document.getElementById('ajax_minicart').style.display='none';}}}
var post_params=[];if(alt_post_params!=null){post_params=alt_post_params;alt_post_params=null;}else{productidparam=document.orderform.productid.value;qtyparam=1;if(document.getElementById("product_avail")!=null){qtyparam=document.getElementById("product_avail").value;}else if(document.orderform.amount!=null){qtyparam=document.orderform.amount.value;}
var x_access_on=new Array();var x_accessories=new Array();var x_product_options_access=new Array();if(typeof(access_arr)!='undefined'){if(access_arr!=null){for(var i=0;i<access_arr.length;i++){if(document.getElementById("access_on_"+access_arr[i][0]).checked==true){x_access_on[access_arr[i][2]]="Y";x_accessories[access_arr[i][2]]=document.getElementById("accessories_"+access_arr[i][0]).value;if(names_access[access_arr[i][0]]!=null){for(naac in names_access[access_arr[i][0]]){x_product_options_access[access_arr[i][2]]=[];x_product_options_access[access_arr[i][2]][naac]=document.getElementById("xpo"+naac).value;}}}}}}
post_params={amount:qtyparam,productid:productidparam,mode:'add',ajaxmode:'Y',mainproductid:productidparam,access_on:x_access_on,accessories:x_accessories,product_options_access:x_product_options_access};if(document.getElementById("customers_price")!=null)
post_params['price']=document.getElementById("customers_price").value;var product_options_vals=[];if(typeof(names)!="undefined"){for(clsid in names){product_options_vals[clsid]=document.getElementById("po"+clsid).value;}
post_params['product_options']=product_options_vals;}}
if(cached_img_loader!=null){document.getElementById('ajax_minicart').innerHTML=cached_img_loader;}else{cached_img_loader=document.getElementById('ajax_minicart').innerHTML;}
if(!aatc_popup_in_shadowbox){document.getElementById('ajax_minicart').style.display='block';m_cart_left=(document.body.clientWidth-400)/2;document.getElementById('ajax_minicart').style.left=m_cart_left+"px";m_cart_top=30+f_scrollTop();document.getElementById('ajax_minicart').style.top=m_cart_top+"px";}
req.caching=false;req.open('POST','ajax_cart.php',true);req.send(post_params);if(ga_minicart_on){if(typeof(pageTracker)!="undefined"){if(pageTracker._trackPageview){pageTracker._trackPageview('/minicart');}}}}
function add2cart_ajax_2(prodid,qty,mainprodid){alt_post_params={productid:prodid,mode:'add',ajaxmode:'Y',mainproductid:mainprodid,amount:qty};add2cart_ajax(null);}
function add2cart_ajax_item(prodid,qty){alt_post_params={productid:prodid,mode:'add',ajaxmode:'Y',mainproductid:prodid,amount:qty};add2cart_ajax(null);}
function aatc_startdrag(t,e){if(e.preventDefault)e.preventDefault();e.cancelBubble=true;window.document.onmousemoveOld=window.document.onmousemove;window.document.onmouseupOld=window.document.onmouseup;window.document.onmousemove=aatc_dodrag;window.document.onmouseup=aatc_stopdrag;window.document.draged=t;t.dragX=e.clientX;t.dragY=e.clientY;return false;}
function aatc_dodrag(e){if(!e)e=event;t=window.document.draged;t.style.left=(t.offsetLeft+e.clientX-t.dragX)+"px";t.style.top=(t.offsetTop+e.clientY-t.dragY)+"px";t.dragX=e.clientX;t.dragY=e.clientY;return false;}
function aatc_stopdrag(){window.document.onmousemove=window.document.onmousemoveOld;window.document.onmouseup=window.document.onmouseupOld;}
