function browserInfo()
{this.plugMoz=function(plug)
{tabMime="";for(var i=0;i<navigator.mimeTypes.length;i++)
tabMime+=navigator.mimeTypes[i].type.toLowerCase();find=false;if(tabMime.indexOf(plug)!=-1)
{if(navigator.mimeTypes[plug].enabledPlugin!=null)
{find=true;}}
return find;}
this.plugIE=function(plug)
{find=false;document.write('<SCR'+'IPT LANGUAGE=VBScript>\n on error resume next \n find = IsObject(CreateObject("'+plug+'"))</SCR'+'IPT>\n');if(find)
return true;else
return false;}
this.agent=navigator.userAgent;var clientPC=navigator.userAgent;this.is_dom=document.getElementById;this.is_mac=(clientPC.indexOf('Mac')!=-1);this.is_win=(clientPC.indexOf('Windows')!=-1);this.is_nix=(clientPC.indexOf('Linux')!=-1)||(clientPC.indexOf('X11')!=-1);this.is_gecko=((clientPC.indexOf('Gecko')!=-1)&&(clientPC.indexOf('Spoofer')==-1)&&(clientPC.indexOf('KHTML')==-1)&&(clientPC.indexOf('Netscape/7.0')==-1));this.is_safari=((clientPC.indexOf('AppleWebKit')!=-1)&&(clientPC.indexOf('spoofer')==-1));this.is_khtml=(navigator.vendor=='KDE'||(document.childNodes&&!document.all&&!navigator.taintEnabled));this.is_opera=(clientPC.indexOf('Opera')!=-1);var rslt=navigator.appVersion.match(/MSIE (\d+\.\d+)/,'');if(rslt!=null&&!this.is_opera)
{this.ie_ver=Number(rslt[1]);this.is_ie=true;}
else
{this.is_ie=false;}
this.sx=screen.width;this.sy=screen.height;this.bpp=screen.colorDepth;if(navigator.javaEnabled())
this.java=true;else
this.java=false;if(this.is_win&&this.is_ie)
{this.director=plugIE("SWCtl.SWCtl.1");this.flash=plugIE("ShockwaveFlash.ShockwaveFlash.1");this.pdf=false;if(this.plugIE("PDF.PdfCtrl.1"))this.pdf=true;if(this.plugIE('PDF.PdfCtrl.5'))this.pdf=true;if(this.plugIE('PDF.PdfCtrl.6'))this.pdf=true;this.quickTime=this.plugIE("QuickTimeCheckObject.QuickTimeCheck.1");this.real=this.plugIE("rmocx.RealPlayer G2 Control.1");this.winMedia=this.plugIE("MediaPlayer.MediaPlayer.1");}
if(!this.is_win||this.is_gecko||this.is_opera)
{this.director=this.plugMoz("application/x-director");this.flash=this.plugMoz("application/x-shockwave-flash");this.pdf=this.plugMoz("application/pdf");this.quickTime=this.plugMoz("video/quicktime");this.real=this.plugMoz("audio/x-pn-realaudio-plugin");this.winMedia=this.plugMoz("application/x-mplayer2");}
this.getInfo=function()
{var info;info="";for(i in this)
{if(typeof this[i]!='function')
{info+=i+": "+this[i]+"; ";}}
return"{"+info.substring(0,info.length-2)+"}";}}
var myBrowser=new browserInfo();function $(id)
{return document.getElementById(id);}
function debug(elem){var debugtxt;var opera=false;debugtxt=elem+"\n";for(i in elem){debugtxt+=(opera)?"\n"+i+" ("+typeof elem[i]+") "+elem[i]:", "+i;}
if(opera)
{opera.postError(debugtxt);}
else
{alert(elem+"\n---\n"+debugtxt);}}
function debug_ie(elem){var debugtxt;debugtxt=elem;alert(debugtxt);}
function addEvent(obj,event,handler)
{if(obj&&obj.addEventListener)
{obj.addEventListener(event,handler,false);}
else if(obj&&obj.attachEvent)
{obj.attachEvent(event,handler);}}
function onLoadHook(){if(!(document.getElementById&&document.getElementsByTagName)){return;}
AddAccesskeyHelp();RelTags();}
addEvent(window,"load",onLoadHook);function FixAlpha(){if(myBrowser.is_ie&&myBrowser.ie_ver>=5.5){var pngs=document.getElementsByTagName('img');for(p=0;p<pngs.length;p++){var src=pngs[p].src;if(src.match(/\.png/i)!=null&&src.match(/\pixel.png/i)==null){var mypng=src.substring(5,src.length);pngs[p].src="ie_pngfix.gif";pngs[p].alt="";pngs[p].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src='"+mypng+"')";pngs[p].style.width=pngs[p].width;pngs[p].style.height=pngs[p].height;}}}}
function AddAccesskeyHelp(){anchors=document.getElementsByTagName('a');pref='alt-';if(myBrowser.is_safari||myBrowser.is_mac){pref='control-';}
if(myBrowser.is_opera){pref='shift-esc-';}
for(a=0;a<anchors.length;a++){var title=anchors[a].title;var accessKey=anchors[a].accessKey;if(title.length==0){title=anchors[a].innerHTML;}
if(accessKey.length==1){anchors[a].title=title+' ['+pref+accessKey+']';}}}
function RelTags(){if(document.getElementsByTagName){var hostname=document.location.hostname;var anchors=document.getElementsByTagName("a");for(var loop=0;loop<anchors.length;loop++){var anchor=anchors[loop];if(anchor.getAttribute("class")=="noext")
break;if(anchor.getAttribute("href")&&anchor.getAttribute("class")=="external"){anchor.target="_blank";}
else if(anchor.getAttribute("href")&&anchor.hostname!=hostname&&anchor.getAttribute('rel')!='lightbox'&&anchor.innerHTML!='')
{anchor.target=(anchor.hostname)?"_blank":"";}}}}
function toogle(id){with(document.getElementById(id).style){if(display=="none")
display=""
else
display="none";}}
function setOpacity(obj,opacity){opacity=(opacity>=0&&opacity<=1)?opacity:0;obj.style.opacity=opacity;}
function setCookie(name,value,expire){document.cookie=tplPrefix+name+'='+escape(value)+
(expire?'; expires='+new Date(+new Date()+expire*1e3).toGMTString():'')+'; path=/';}
function getCookie(name){var cookies=document.cookie;var cookie;if(cookies)
{cookies=cookies.split(/; ?/g);while(cookies[0])
{cookie=cookies.pop().split('=');cookies[cookie[0]]=unescape(cookie[1]);}}
return cookies[tplPrefix+name];}
function toogle(obj)
{if(obj.style.display=="none")
{obj.style.display="";}
else
{obj.style.display="none";}}
function toogleMenu(menuID,button)
{var menu=$(menuID+'-menu');var sub=$(menuID+'-sub-menu');if(menu.className=="opened")
{menu.className="";}
else
{toogleMenuOff('login');toogleMenuOff('search');toogleMenuOff('about');menu.className="opened";}}
function toogleMenuOff(menu)
{$(menu+'-menu').className="";}
addEvent(window,"click",function()
{});function Ajax(){this.createTransport=function()
{if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(window.ActiveXObject){return new ActiveXObject("Msxml2.XMLHTTP");}
return false;}
this.init=function(){transport=this.createTransport();if(transport.overrideMimeType)
transport.overrideMimeType('text/xml');transport.onreadystatechange=this.onReady;}
this.onSuccess=function(){}
this.onError=function(){}
this.onReady=function(){if(transport.readyState==4){if(transport.status==200)
{try
{json=transport.responseText.replace(/\n/g,"\\n");obj.json=eval('('+json+')');}
catch(ex)
{obj.json=false;}
obj.text=transport.responseText;obj.xml=transport.responseXML;obj.onSuccess();}
else
{obj.onError();}}}
this.get=function(url)
{transport.open('GET',url,true);transport.send(null);}
this.post=function(url,query)
{transport.open('POST',url,true);transport.setRequestHeader('Content-type','application/x-www-form-urlencoded');transport.send(query);}
var transport;var json=false;var text=false;var xml=false;var obj=this;this.init();}
function Animate(box)
{var obj=this;this.animateBox=box;this.data=new Array();this.frames=new Array();this.currentFrame=-1;this.currentPhase=0;var phaseMax=50;var phaseFade=10;this.add=function(frame)
{this.data[this.data.length]=frame;}
this.start=function()
{for(frame in this.data)
{this.frames[frame]='<strong class="price">'+this.data[frame].price+'</strong>'+'<a href="'+this.data[frame].url+'" title="'+this.data[frame].title+'">'+
this.data[frame].name+'</a>';}
this.currentFrame=-1;this.animate();}
this.animate=function()
{if(obj.currentPhase<0)
{}
else if(obj.currentPhase<phaseFade)
setOpacity(obj.animateBox,obj.currentPhase/phaseFade);else if(obj.currentPhase<phaseMax-phaseFade)
setOpacity(obj.animateBox,1);else if(obj.currentPhase<=phaseMax)
setOpacity(obj.animateBox,(phaseMax-obj.currentPhase)/phaseFade);obj.currentPhase++;if(obj.currentPhase>phaseMax+1||obj.currentFrame==-1)
{obj.next();}
setTimeout(obj.animate,75);}
this.next=function()
{this.currentPhase=-1;this.currentFrame++;if(this.currentFrame>=this.frames.length)
this.currentFrame=0;this._update();}
this.prev=function()
{this.currentPhase=-1;this.currentFrame--;if(this.currentFrame<0)
this.currentFrame=this.frames.length-1;this._update();}
this._update=function()
{setOpacity(this.animateBox,0);this.animateBox.innerHTML=this.frames[this.currentFrame];}}
function potdAnimate(_data)
{var obj=this;this.data=_data;this.animateBox;this.currentFrame=-1;this.currentPhase=0;var phaseMax=50;var phaseFade=8;this.add=function(frame)
{this.data[this.data.length]=frame;img=new Image();img.src=frame.img;}
this.start=function()
{this.currentFrame=-1;this.animateBox=$('index-potd');this.animate();}
this.animate=function()
{if(obj.currentPhase<0)
{}
else if(obj.currentPhase<phaseFade)
setOpacity(obj.animateBox,obj.currentPhase/phaseFade);else if(obj.currentPhase<phaseMax-phaseFade)
setOpacity(obj.animateBox,1);else if(obj.currentPhase<=phaseMax)
setOpacity(obj.animateBox,(phaseMax-obj.currentPhase)/phaseFade);obj.currentPhase++;if(obj.currentPhase>phaseMax+1||obj.currentFrame==-1)
{obj.next(true);setOpacity(obj.animateBox,0);obj._update();}
setTimeout(obj.animate,75);}
this.next=function(_internal)
{if(_internal){this.currentPhase=-1;}
else{this.currentPhase=phaseFade;setOpacity(this.animateBox,1);}
this.currentFrame++;if(this.currentFrame>=this.data.length)
this.currentFrame=0;this._update();}
this.prev=function()
{this.currentPhase=phaseFade;this.currentFrame--;setOpacity(this.animateBox,1);if(this.currentFrame<0)
this.currentFrame=this.data.length-1;this._update();}
this._update=function()
{$('index-potd-name').innerHTML='<a href="'+this.data[this.currentFrame].url+'">'+this.data[this.currentFrame].name+'</a>';$('index-potd-desc').innerHTML=this.data[this.currentFrame].description;$('index-potd').style.backgroundImage='url("'+this.data[this.currentFrame].img+'")';}}