var OP=navigator.userAgent.indexOf('Opera/')!=-1;var FF=navigator.userAgent.indexOf('Firefox/')!=-1;var SF=navigator.userAgent.indexOf('Safari/5')!=-1;var GC=navigator.userAgent.indexOf('Chrome/')!=-1;var IE=navigator.userAgent.indexOf('MSIE ')!=-1;var IE6=navigator.userAgent.indexOf('MSIE 6.')!=-1;var IE7=navigator.userAgent.indexOf('MSIE 7.')!=-1;var IE8=navigator.userAgent.indexOf('MSIE 8.')!=-1;var size=gobo_viewport();var vpWidth=size.ViewportWidth;var vpHeight=size.ViewportHeight;function gobo(gbOption,gbContent,gbTitle,gbLight,gbWidth){if(!gbWidth)var gbWidth=500;if(gbOption=='show'){scroll(0,0);NavBox=document.createElement('div');NavBox.setAttribute('id','NavBox');document.getElementsByTagName('body')[0].appendChild(NavBox);NewBox=document.createElement('div');NewBox.setAttribute('id','NewBox');document.getElementsByTagName('body')[0].appendChild(NewBox);NewBoxHolder=document.createElement('div');NewBoxHolder.setAttribute('id','NewBoxHolder');document.getElementById('NewBox').appendChild(NewBoxHolder);if(IE6!=true){NewBoxLoader=document.createElement('div');NewBoxLoader.setAttribute('id','NewBoxLoader');document.getElementById('NewBoxHolder').appendChild(NewBoxLoader);}
NewBoxDisplay=document.createElement('div');NewBoxDisplay.setAttribute('id','NewBoxDisplay');document.getElementById('NewBoxHolder').appendChild(NewBoxDisplay);document.getElementById('NewBoxDisplay').style.height="auto";document.getElementById('NewBoxDisplay').style.width=gbWidth+"px";gobo('resize','','','',gbWidth);if(IE6==true){document.getElementById('NewBox').style.width=vpWidth+"px";document.getElementById('NewBox').style.height=vpHeight+"px";}
ContentNav='';if(gbLight==1){document.getElementById('NewBox').style.backgroundImage="url('images/common/gobo_overlay.png')";gbContentThumb="see/"+gbContent;gbContentHalf="half/"+gbContent;gbContentFull="full/"+gbContent;gbCache=gbContent.search("cache/");if(gbCache==0){gbContentMain=gbContent.replace("free-","TYPE-");gbContentMain=gbContentMain.replace("see-","TYPE-");gbContentThumb=gbContent;gbContentHalf=gbContentMain.replace("TYPE-","half-");gbContentFull=gbContentMain.replace("TYPE-","full-");}
ContentNav=ContentNav+'<a onclick="gobo_preload(\''+gbContentThumb+'\');">Thumb</a>';ContentNav=ContentNav+'<a onclick="gobo_preload(\''+gbContentHalf+'\');">50%</a>';ContentNav=ContentNav+'<a onclick="gobo_preload(\''+gbContentFull+'\');">100%</a>';}
ContentNav=ContentNav+'<img id="NavBoxClose" src="images/spacer.gif" onclick="gobo(\'close\')">';NavBox.innerHTML=ContentNav;if(gbLight!=1){if(IE6!=true){NewBoxLoader.innerHTML='<img src="images/common/gobo_loading.gif"><br>Loading...';document.getElementById('NewBoxDisplay').style.display="none";}
setTimeout(function(a,b){NewBoxDisplay.innerHTML="<div id='dClose'><div id='aClose'><img src='images/common/gobo_x.gif'></div></div>"+gbContent;document.getElementById('NewBoxDisplay').style.display="block";document.getElementById('NavBox').style.display="none";if(IE6!=true)document.getElementById('NewBoxLoader').style.display="none";document.getElementById('aClose').onclick=function(){gobo('close');}},200);}
if(gbLight==1){if(IE6==true){NewBoxDisplay.innerHTML='<div>'+gbTitle+'</div><img id="gbSource" src="'+gbContentThumb+'">';document.getElementById('NewBoxDisplay').style.display="block";}else{NewBoxLoader.innerHTML='<img src="images/common/gobo_loading.gif"><br>Loading...';NewBoxDisplay.innerHTML='<div>'+gbTitle+'</div><img id="gbSource" src="images/spacer.gif">';gobo_preload(gbContentThumb);}
if(IE==true)document.body.scroll="no";document.getElementById('NewBox').onclick=function(){gobo('close');}}}
if(gbOption=='close'){document.body.scroll="yes";document.getElementsByTagName('body')[0].removeChild(NewBox);document.getElementsByTagName('body')[0].removeChild(NavBox);if(IE8==true)document.body.style.overflow="auto";}
if(!gbOption||gbOption=='resize'){var MathLeft=((vpWidth-gbWidth)/2)+"px";if(IE6==true||IE7==true)MathLeft="auto";if(document.getElementById('NewBoxDisplay'))document.getElementById('NewBoxDisplay').style.left=MathLeft;if(IE8==true)document.body.style.overflow="hidden";if(IE==true){if(document.getElementById('NewBox'))document.getElementById('NavBox').style.top="0px";}else{if(document.getElementById('NewBox'))document.getElementById('NavBox').style.top=(vpHeight-30)+"px";}}}
function gobo_preload(gbLink){if(IE6!=true){document.getElementById('NewBoxLoader').style.display="block";document.getElementById('NewBoxDisplay').style.display="none";var img=new Image();img.src=gbLink;img.onload=setTimeout("gobo_loaded('"+gbLink+"')",500);}else{document.getElementById('gbSource').src=gbLink;}}
function gobo_loaded(gbLink){document.getElementById('gbSource').src=gbLink;document.getElementById('NewBoxLoader').style.display="none";document.getElementById('NewBoxDisplay').style.display="block";}
function gobo_viewport(){var ViewportWidth;var ViewportHeight;if(typeof window.innerWidth!='undefined'){ViewportWidth=window.innerWidth;ViewportHeight=window.innerHeight;}
else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){ViewportWidth=document.documentElement.clientWidth;ViewportHeight=document.documentElement.clientHeight;}
else{ViewportWidth=document.getElementsByTagName("body")[0].clientWidth;ViewportHeight=document.getElementsByTagName("body")[0].clientHeight;}
return{ViewportWidth:ViewportWidth,ViewportHeight:ViewportHeight};}
window.onresize=gobo;
