                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                if(!window.__td){window.__MT=100;window.__ti=0;window.__td=[];window.__td.length=__MT;window.__noTrace=false;}if(typeof(vp)=="undefined")
{
var vp={};
}





var thumbSize=50;
var thumbSpacing=15;
var tickerFrameSize=460;


var currentLeft=0;
var stepSize=thumbSize+thumbSpacing;

var selectedItem;
var selectedItemOffImg;

var selectedImgGroupId=0;
var selectedImgWithInGroup=0;

var images=new Array();







function enableTickerLeftArrow()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var leftArrow=document.getElementById("tickerLeftArrow");
leftArrow.className="leftArrowEnabled";
leftArrow.onclick=slideTickerLeft;
}


function disableTickerLeftArrow()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var leftArrow=document.getElementById("tickerLeftArrow");
leftArrow.className="leftArrowDisabled";
leftArrow.onclick="";
}


function enableTickerRightArrow()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var rightArrow=document.getElementById("tickerRightArrow");
rightArrow.className="rightArrowEnabled";
rightArrow.onclick=slideTickerRight;
}


function disableTickerRightArrow()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var rightArrow=document.getElementById("tickerRightArrow");
rightArrow.className="rightArrowDisabled";
rightArrow.onclick="";
}



function verifyTickerArrowsUseable()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(canTickerMoveLeft())
{
enableTickerLeftArrow();
}
else
{
disableTickerLeftArrow();
}

if(canTickerMoveRight())
{
enableTickerRightArrow();
}
else
{
disableTickerRightArrow();
}
}


function updateTickerPosition()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var ticker=document.getElementById('ticker');
ticker.style.left=currentLeft;
verifyTickerArrowsUseable();
}


function getTickerSize()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
return(images.length*thumbSize)+((images.length+1)*thumbSpacing)+20;
}



function canTickerMoveLeft()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var ticker=document.getElementById('ticker');
var tickerSize=getTickerSize();
return(currentLeft>(tickerFrameSize-tickerSize));
}


function canTickerMoveRight()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
var ticker=document.getElementById('ticker');
return(currentLeft<0);
}


function slideTickerLeft()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(canTickerMoveLeft())
{
currentLeft-=stepSize;
updateTickerPosition();
}
}


function slideTickerRight()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(canTickerMoveRight())
{
currentLeft+=stepSize;
updateTickerPosition();
}
}








vp.setSelectedItem=function setSelectedItem(newId,newOffImg)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
selectedItem=newId;
selectedItemOffImg=newOffImg;

selectedImgGroupId=selectedItem.substring(4);

selectedImgWithInGroup=0;

vp.showLeftRightArrows();
};

vp.deselectExampleImage=function deselectExampleImage(offVar,offImg)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(offVar!=selectedItem)
{
document.getElementById(offVar).src=offImg;
}
};

vp.clickedImage=function clickedImage(onId,fullsizeImg,onImg,offImg)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
document.getElementById(selectedItem).src=selectedItemOffImg;

vp.setSelectedItem(onId,offImg);

document.getElementById(onId).src=onImg;
document.getElementById('examples-fullsize-area').style.backgroundImage="url("+fullsizeImg+")";
};

vp.nextImageInGroup=function nextImageInGroup()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if((selectedImgWithInGroup+1)<images[selectedImgGroupId].length)
{selectedImgWithInGroup=selectedImgWithInGroup+1;
var url=images[selectedImgGroupId][selectedImgWithInGroup];
document.getElementById('examples-fullsize-area').style.backgroundImage="url("+url+")";
vp.showLeftRightArrows();
}
};

vp.prevImageInGroup=function prevImageInGroup()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if((selectedImgWithInGroup-1)>=0)
{selectedImgWithInGroup=selectedImgWithInGroup-1;
var url=images[selectedImgGroupId][selectedImgWithInGroup];
document.getElementById('examples-fullsize-area').style.backgroundImage="url("+url+")";
vp.showLeftRightArrows();
}
};

vp.showLeftRightArrows=function showLeftRightArrows()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
vp.showControl("examples-leftarrow-span");
vp.showControl("examples-rightarrow-span");


if(selectedImgWithInGroup==(images[selectedImgGroupId].length-1))
{
vp.hideControl("examples-rightarrow-span");
}


if(selectedImgWithInGroup===0)
{
vp.hideControl("examples-leftarrow-span");
}

};


vp.hideControl=function hideControl(id)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(document.getElementById)
{
document.getElementById(id).style.display="none";
}
else
{
if(document.layers)
{
document.id.display="none";
}
else
{
document.all.id.style.display="none";
}
}
};


vp.showControl=function showControl(id)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
if(document.getElementById)
{
document.getElementById(id).style.display="";
}
else
{
if(document.layers)
{
document.id.display="";
}
else
{
document.all.id.style.display="";
}
}
};


vp.initializeImageCollection=function initializeImageCollection(categoryId,categoryImages)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
images[categoryId]=categoryImages;
};



function initializeData()
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
images=new Array();
}



function initializeInterface(tickerSize,thumbnailSize,thumbnailSpacing)
{if(!window.__noTrace){__td[__ti]=arguments;__ti=__ti>=__MT?0:__ti+1;}
tickerFrameSize=tickerSize;
thumbSize=thumbnailSize;
thumbSpacing=thumbnailSpacing;
stepSize=(thumbSize+thumbSpacing)*2;


verifyTickerArrowsUseable();
vp.showLeftRightArrows();
}