//By: Richard Lee - Transcendent Design - tdesignonline.com
var closeimagelink="tuberbox/closebutton2.gif"//closebutton image
var loaderimagelink="tuberbox/loader3.gif"//loader image
var IE6=(navigator.userAgent.indexOf("MSIE 6")>=0)
var IE=(navigator.userAgent.indexOf("MSIE")>=0)
var opera=(navigator.userAgent.indexOf("Opera")>=0)
var thebody=document.getElementsByTagName('body')
var lbox=document.createElement("div")
var tubewidth=425
var tubeheight=344

if(IE6){returnValue=False}
lbox.setAttribute('id','tuberbox')
thebody[0].appendChild(lbox)
thebody[0].insertBefore(lbox,thebody[0].firstChild)
var tuberboxwrapper=document.createElement("div")
tuberboxwrapper.setAttribute('id','tuberboxwrapper')
lbox.appendChild(tuberboxwrapper)
var labox=document.createElement("div")
labox.setAttribute('id','tuberboxcontent')
tuberboxwrapper.appendChild(labox)
var portimage=document.createElement('div')
portimage.setAttribute('id','portimage')
var txt = document.createTextNode("Hello");
portimage.appendChild(txt)
labox.appendChild(portimage)
var lboxlink=document.createElement('a')
lboxlink.setAttribute('id','closebutton')
labox.appendChild(lboxlink)
var closeimg=document.createElement('img')
closeimg.setAttribute('src',closeimagelink)
closeimg.setAttribute('id','tubercloseimage')
closeimg.width="28"
closeimg.height="20"
lboxlink.appendChild(closeimg)
lbox.onclick=function(){
tuberbox.setAttribute('class','hide')
tuberbox.style.display="none"}
var piclinks=document.getElementsByTagName('a')
var tuberbox=document.getElementById('tuberbox')
var thepage=document.getElementById('page')
var z
for(z=0;z<piclinks.length;z++){
if(piclinks[z].getAttribute('rel')=='tuberbox'){
piclinks[z].onclick=function(){
return setpic(this)}}}
var closebutton=document.getElementById('closebutton')
closebutton.onclick=function(){
tuberbox.setAttribute('class','hide')
tuberbox.style.display="none"}
function setpic(thispic){
var source=thispic.getAttribute("href")
document.getElementById('portimage').innerHTML='<object width="'+tubewidth+'" height="'+tubeheight+'"><param name="movie" value="'+source+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+source+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'+tubewidth+'" height="'+tubeheight+'"></embed></object>'
var placeholder=document.getElementById("placeholder")
var description=document.getElementById("tuberbox")
if(thispic.getAttribute('rel')=='tuberbox'){
function setdim(){
var imgdim=document.getElementById('portimage')
var wrapper=document.getElementById('tuberboxwrapper')
var bwidth3=document.documentElement.clientWidth
wrapper.style.left=((bwidth3-tubewidth)/2)+"px"
wrapper.style.width=tubewidth+"px"
wrapper.style.height=tubewidth+"px"
document.getElementById('tuberbox').style.width=bwidth3+"px"
setTimeout("tuberbox.setAttribute('class','show')",75)
setTimeout("tuberbox.style.display='block'",75)
}
setdim()
return false}}
function timedCount(){
var bwidth4=document.documentElement.clientWidth
var bheight4=document.documentElement.clientHeight
var wrapper4=document.getElementById('tuberboxwrapper')
tuberbox.style.minHeight="700px"
wrapper4.style.left=((bwidth4-tubewidth)/2)+"px"
wrapper4.style.position="absolute"
thebody[0].style.minHeight="800px"
if(IE6){
wrapper4.style.top=(((bheight4-tubeheight)/2)+document.documentElement.scrollTop)+"px";}
else if(opera){wrapper4.style.top=((bheight4-tubeheight-150)/2)+"px";}
else{wrapper4.style.top=((bheight4-tubeheight)/2)+"px";}
setTimeout("timedCount()",1)}
timedCount()