//The following code was used originally at eyestorm.com
//It was taken and cleaned up a bit (stuff not needed at
//glassdog.com was removed) and altered here and there.
//It is otherwise almost entirely not original code.

var topOffset = 70;
var HANDLER;
var plugin = 0;
var bSound = 1;


if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
	if (navigator.plugins && navigator.plugins["Shockwave Flash"])
	{
		if ( navigator.plugins["Shockwave Flash"].description.indexOf("5.") != -1 ){plugin = 1;}
		if ( navigator.plugins["Shockwave Flash"].description.indexOf("6.") != -1 ){plugin = 1;}
	}
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
//	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
//	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
//	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	document.write('</SCRIPT\> \n');
}


//plugin=0;

function bookmark(title){
   if (!document.all) {
      alert('Appuez sur ctrl-d pour mettre cette page en favoris sur un pc. Si vous utilisez un mac, appuez sur pomme-d pour mettre cette page en favoris.');
   }
   else
   {
   	if ( navigator.appVersion.indexOf("Mac") != -1 ){
   		alert('Appuez sur ctrl-d pour mettre cette page en favoris sur un pc. Si vous utilisez un mac, appuez sur pomme-d pour mettre cette page en favoris.');
   	}
   	else
   	{
   		 external.AddFavorite(window.location.href,title);
   	}
   }
   return false;
}
function bookmarkflash(){
   if (!document.all) {
      alert('Appuez sur ctrl-d pour mettre cette page en favoris sur un pc. Si vous utilisez un mac, appuez sur pomme-d pour mettre cette page en favoris.');
   }
   else
   {
   	if ( navigator.appVersion.indexOf("mac") != -1 ){
   		alert('Appuez sur ctrl-d pour mettre cette page en favoris sur un pc. Si vous utilisez un mac, appuez sur pomme-d pour mettre cette page en favoris.');
   	}
   	else
   	{
   		 external.AddFavorite(window.location.href,'');
   	}
   }
}

function setAssignSpy(){
	document.cookie="FirstAssigned=y;expires=Thu, 24-Sep-2026 00:00:01 GMT;path=/";
}

function getURLSend(){
	var this_URL;
	this_URL = window.location.href;
	window.location.href = 'send.cgi?url=' + this_URL;	
}
function setsound( bVoice )
{

}


function soundoff(){
	document.cookie="sound=off;path=/";
	
}

function soundon()
{
	document.cookie="sound=on;path=/";
	
	
}

function getURLMailingList()
{
	var this_URL;
	this_URL = window.location.href;
	window.location.href = 'mailinglist.cgi?url=' + this_URL;
}

function renderFlash( url, width, height, bgcolor, alternative )
{
	renderFlashEx( url, width, height, bgcolor, alternative, false )
}

function renderFlashHomePage( url, width, height, bgcolor, alternative )
{
	if ( plugin ) {
		document.write('<div style="position:absolute; left: 0px; top: 0px; width: 100%; z-index:25; visibility: visible;"><table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td align="center">');
			
		document.write('<object \n');
		document.write('	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n');
	 	document.write('	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\n');
	 	document.write('	width="' + width + '"\n');
	 	document.write('	height="' + height + '"\n');
	 	document.write('	id="navigation"\n');
	 	document.write('	align=""\n');
	 	document.write('>\n');
	 	document.write('	<param name=movie value="' + url + '">\n');
	 	document.write('	<param name=quality value=high>\n');
	 	document.write('	<param name=bgcolor value=' + bgcolor + '>\n');
	 	document.write('	<embed \n');
	 	document.write('		src="' + url + '" \n');
	 	document.write('		quality=high \n');
	 	document.write('		bgcolor=' + bgcolor + '  \n');
	 	document.write('		width="' + width + '" \n');
	 	document.write('		height="' + height + '" \n');
	 	document.write('		name="navigation" \n');
	 	document.write('		align=""\n');
	 	document.write('		type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"\n');
	 	document.write('	>\n');
	 	document.write('	</embed>\n');
		document.write('</object>');
		
		document.write('</td></tr></table></div><img src=/images/color_clear.gif" width="' + width + '" height="' + height + '" alt=""><br>\n');
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write(alternative);
	}
}

function renderFlashCenterEx( url, width, height, bgcolor, alternative, div )
{
	if ( plugin ) {
			
		document.write('<object \n');
		document.write('	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n');
	 	document.write('	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\n');
	 	document.write('	width="' + width + '"\n');
	 	document.write('	height="' + height + '"\n');
	 	document.write('	id="navigation"\n');
	 	document.write('	align="center"\n');
	 	document.write('>\n');
	 	document.write('	<param name=movie value="' + url + '">\n');
	 	document.write('	<param name=quality value=high>\n');
	 	document.write('	<param name=bgcolor value=' + bgcolor + '>\n');
		//document.write('	<param name=wmode value=transparent>\n'); 
	 	document.write('	<embed \n');
	 	document.write('		src="' + url + '" \n');
	 	document.write('		quality=high \n');
	 	document.write('		bgcolor=' + bgcolor + '  \n');
	 	document.write('		width="' + width + '" \n');
	 	document.write('		height="' + height + '" \n');
	 	document.write('		name="navigation" \n');
	 	document.write('		align="center"\n');
	 	document.write('		type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"\n');
	 	document.write('	>\n');
	 	document.write('	</embed>\n');
		document.write('</object>');
		
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write(alternative);
	}
}



function renderFlashEx( url, width, height, bgcolor, alternative, div )
{
	if ( plugin ) {
		if( div )
			document.write('<div style="position:absolute; width:' + width + 'px; height:' + height + 'px; left: 0px; top: 0px; z-index:25; visibility: visible;">');
			
		document.write('<object \n');
		document.write('	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n');
	 	document.write('	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\n');
	 	document.write('	width="' + width + '"\n');
	 	document.write('	height="' + height + '"\n');
	 	document.write('	id="navigation"\n');
	 	document.write('	align=""\n');
	 	document.write('>\n');
	 	document.write('	<param name=movie value="' + url + '">\n');
	 	document.write('	<param name=quality value=high>\n');
	 	document.write('	<param name=bgcolor value=' + bgcolor + '>\n');
		//document.write('	<param name=wmode value=transparent>\n'); 
	 	document.write('	<embed \n');
	 	document.write('		src="' + url + '" \n');
	 	document.write('		quality=high \n');
	 	document.write('		bgcolor=' + bgcolor + '  \n');
	 	document.write('		width="' + width + '" \n');
	 	document.write('		height="' + height + '" \n');
	 	document.write('		name="navigation" \n');
	 	document.write('		align=""\n');
	 	document.write('		type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"\n');
	 	document.write('	>\n');
	 	document.write('	</embed>\n');
		document.write('</object>');
		
	
		if( div )
			document.write('</div><img src=/images/color_clear.gif" width="' + width + '" height="' + height + '" alt=""><br>\n');					
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write(alternative);
	}
}


function renderFlashMain( url, width, height, bgcolor, alternative)
{
	
	if ( plugin ) {
				
		document.write('<object \n');
		document.write('	classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"\n');
	 	document.write('	codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\n');
	 	document.write('	width="' + width + '"\n');
	 	document.write('	height="' + height + '"\n');
	 	document.write('	id="navigation"\n');
	 	document.write('	align=""\n');
	 	document.write('>\n');
	 	document.write('	<param name=movie value="' + url + '">\n');
	 	document.write('	<param name=quality value=high>\n');
	 	document.write('	<param name=bgcolor value=' + bgcolor + '>\n');
	 	document.write('	<embed \n');
	 	document.write('		src="' + url + '" \n');
	 	document.write('		quality=high \n');
	 	document.write('		bgcolor=' + bgcolor + '  \n');
	 	document.write('		width="' + width + '" \n');
	 	document.write('		height="' + height + '" \n');
	 	document.write('		name="navigation" \n');
	 	document.write('		align=""\n');
	 	document.write('		type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"\n');
	 	document.write('	></embed></object></td></tr>');
					
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write(alternative);
	}
}


function popupWindow( url, height, width )
{
	oWindow = window.open( url, 'popup' + height + '_' + width, 'width=' + width + ',height=' + height + ',scrollbars=no' );
	oWindow.moveTo( 30, 150 );
}

function popupOuttakes()
{
	popupWindow( 'outtakes.htm', 332, 367 );
}

function popupWindowComplete(url, height, width)
{
	
	oWindow = window.open( url, 'PopupWindowComplete'+ height + '_' + width, 'width=' + width + ',height=' + height + ',scrollbars=auto,toolbar=1,status=1,location=1,resizable=1' );
	
}
function popupFullWindow(url, height, width)
{
	
	oWindow = window.open( url, 'PopupFullWindow'+ height + '_' + width, 'width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=1,status=1,location=1,resizable=1' );
	
}
function popupMinime()
{
	oWindow = window.open( '/minime/index.asp', 'Minime', 'width=384,height=288,scrollbars=no,toolbar=0,status=0,location=0,resizable=1');
}

function popupWindowScroll(url, width, height)
{
	
	oWindow = window.open( url, 'PopupWindowScroll'+width+'_'+height , 'width=' + width + 'px,height=' + height + 'px,scrollbars=yes,resizable=1');
}

function mailinglist()
{
	popupWindow('/cgi-bin/list_name_austin.cgi',332,380);
}


function smoothMove() {
	
	if(document.all)
	{	
		 var Dif = parseInt((document.body.scrollTop+topOffset-document.all.menuHolder.offsetTop)*.1)
		 // Work-around wierd Netscape NaN bug when Dif is 0
		 if (isNaN(Dif)) Dif=0
		 document.all.menuHolder.style.pixelTop+=Dif
	}
	else if (document.layers)
	{
		Scroll = window.pageYOffset;
		for ( i=1; i<= 10; i++ )
		{
			dif = (Scroll * .1 * i );
			document.menuHolder.top = topOffset + dif;
		}
		
		
	}
	else
	{
		document.getElementById('menuHolder').style.top = topOffset + window.pageYOffset;
	}

}

function keepAlive() {
 // Move the content into view
 document.all.menuHolder.style.pixelTop = document.body.scrollTop + topOffset
}

function doLoad() {
 if (document.all ){ setup(); }
 else if (document.layers){ setup(); }
 else{}
 
 if((navigator.appName == "Microsoft Internet Explorer")&&(navigator.appVersion.indexOf("Mac") != -1 )&&(navigator.appVersion.indexOf("5") != -1)){
//Mac IE 4.5 doesn't support the smooth method 
  window.onscroll = keepAlive;
 }else{
  HANDLER = window.setInterval("smoothMove()",20)
 }
}

function IE_Win32_fix(){
//Reenable the timer in Win32 IE coz of a flicker problem...
//Solves a problem when returning from the callme popup...[JH]
 if(navigator.appName == "Microsoft Internet Explorer"){
  if(navigator.platform == "Win32"){
   HANDLER = window.setInterval("smoothMove()",20)
   window.focus();
  }
 }
}

function animaster(){
 smoothMove();
}

// Dynamic Layer Object
// sophisticated layer/element targeting and animation object which provides 
//the core functionality needed in most DHTML applications
// 19990604

// Copyright (C) 1999 Dan Steinman
// Distributed under the terms of the GNU Library General Public License
// Available at http://www.dansteinman.com/dynapi/

function DynLayer(id,nestref,frame) {
 if (!is.ns5 && !DynLayer.set && !frame) DynLayerInit()
 this.frame = frame || self
 if (is.ns) {
  if (is.ns4) {
   if (!frame) {
    if (!nestref) var nestref = DynLayer.nestRefArray[id]
    if (!DynLayerTest(id,nestref)) return
    this.css = (nestref)? eval("document."+nestref+".document."+id) : document.layers[id]
   }
   else this.css = (nestref)? eval("frame.document."+nestref+".document."+id) : frame.document.layers[id]
   this.elm = this.event = this.css
   this.doc = this.css.document
  }
  else if (is.ns5) {
   this.elm = document.getElementById(id)
   this.css = this.elm.style
   this.doc = document
  }
  this.x = this.css.left
  this.y = this.css.top
  this.w = this.css.clip.width
  this.h = this.css.clip.height
 }
 else if (is.ie) {
  this.elm = this.event = this.frame.document.all[id]
  this.css = this.frame.document.all[id].style
  this.doc = document
  this.x = this.elm.offsetLeft
  this.y = this.elm.offsetTop
  this.w = (is.ie4)? this.css.pixelWidth : this.elm.offsetWidth
  this.h = (is.ie4)? this.css.pixelHeight : this.elm.offsetHeight
 }
 this.id = id
 this.nestref = nestref
 this.obj = id + "DynLayer"
 eval(this.obj + "=this")
}
function DynLayerMoveTo(x,y) {
 if (x!=null) {
  this.x = x
  if (is.ns) this.css.left = this.x
  else this.css.pixelLeft = this.x
 }
 if (y!=null) {
  this.y = y
  if (is.ns) this.css.top = this.y
  else this.css.pixelTop = this.y
 }
}
function DynLayerMoveBy(x,y) {
 this.moveTo(this.x+x,this.y+y)
}
function DynLayerShow() {
 this.css.visibility = (is.ns4)? "show" : "visible"
}
function DynLayerHide() {
 this.css.visibility = (is.ns4)? "hide" : "hidden"
}
DynLayer.prototype.moveTo = DynLayerMoveTo
DynLayer.prototype.moveBy = DynLayerMoveBy
DynLayer.prototype.show = DynLayerShow
DynLayer.prototype.hide = DynLayerHide
DynLayerTest = new Function('return true')

// DynLayerInit Function
function DynLayerInit(nestref) {
 if (!DynLayer.set) DynLayer.set = true
 if (is.ns) {
  if (nestref) ref = eval('document.'+nestref+'.document')
  else {nestref = ''; ref = document;}
  for (var i=0; i<ref.layers.length; i++) {
   var divname = ref.layers[i].name
   DynLayer.nestRefArray[divname] = nestref
   var index = divname.indexOf("Div")
   if (index > 0) {
    eval(divname.substr(0,index)+' = new DynLayer("'+divname+'","'+nestref+'")')
   }
   if (ref.layers[i].document.layers.length > 0) {
    DynLayer.refArray[DynLayer.refArray.length] = (nestref=='')? ref.layers[i].name : nestref+'.document.'+ref.layers[i].name
   }
  }
  if (DynLayer.refArray.i < DynLayer.refArray.length) {
   DynLayerInit(DynLayer.refArray[DynLayer.refArray.i++])
  }
 }
 else if (is.ie) {
  for (var i=0; i<document.all.tags("div").length; i++) {
   var divname = document.all.tags("div")[i].id
   var index = divname.indexOf("Div")
   if (index > 0) {
    eval(divname.substr(0,index)+' = new DynLayer("'+divname+'")')
   }
  }
 }
 return true
}

DynLayer.nestRefArray = new Array()
DynLayer.refArray = new Array()
DynLayer.refArray.i = 0
DynLayer.set = false

// Slide Methods

function DynLayerSlideTo(endx,endy,inc,speed,fn) {
 if (endx==null) endx = this.x
 if (endy==null) endy = this.y
 var distx = endx-this.x
 var disty = endy-this.y
 this.slideStart(endx,endy,distx,disty,inc,speed,fn)
}

function DynLayerSlideBy(distx,disty,inc,speed,fn) {
 var endx = this.x + distx
 var endy = this.y + disty
 this.slideStart(endx,endy,distx,disty,inc,speed,fn)
}

function DynLayerSlideStart(endx,endy,distx,disty,inc,speed,fn) {
 if (this.slideActive) return
 if (!inc) inc = 10
 if (!speed) speed = 20
 var num = Math.sqrt(Math.pow(distx,2) + Math.pow(disty,2))/inc
 if (num==0) return
 var dx = distx/num
 var dy = disty/num
 if (!fn) fn = null
 this.slideActive = true
 this.slide(dx,dy,endx,endy,num,1,speed,fn)
}

function DynLayerSlide(dx,dy,endx,endy,num,i,speed,fn) {
 if (!this.slideActive) return
 if (i++ < num) {
  this.moveBy(dx,dy)
  this.onSlide()
  if (this.slideActive) setTimeout(this.obj+".slide("+dx+","+dy+","+endx+","+endy+","+num+","+i+","+speed+",\""+fn+"\")",speed)
  else this.onSlideEnd()
 }
 else {
  this.slideActive = false
  this.moveTo(endx,endy)
  this.onSlide()
  this.onSlideEnd()
  eval(fn)
 }
}

function DynLayerSlideInit() {}
DynLayer.prototype.slideInit = DynLayerSlideInit
DynLayer.prototype.slideTo = DynLayerSlideTo
DynLayer.prototype.slideBy = DynLayerSlideBy
DynLayer.prototype.slideStart = DynLayerSlideStart
DynLayer.prototype.slide = DynLayerSlide
DynLayer.prototype.onSlide = new Function()
DynLayer.prototype.onSlideEnd = new Function()

// Clip Methods

function DynLayerClipInit(clipTop,clipRight,clipBottom,clipLeft) {
 if (is.ie) {
  if (arguments.length==4) this.clipTo(clipTop,clipRight,clipBottom,clipLeft)
  else if (is.ie4) this.clipTo(0,this.css.pixelWidth,this.css.pixelHeight,0)
 }
}

function DynLayerClipTo(t,r,b,l) {
 if (t==null) t = this.clipValues('t')
 if (r==null) r = this.clipValues('r')
 if (b==null) b = this.clipValues('b')
 if (l==null) l = this.clipValues('l')
 if (is.ns) {
  this.css.clip.top = t
  this.css.clip.right = r
  this.css.clip.bottom = b
  this.css.clip.left = l
 }
 else if (is.ie) this.css.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)"
}

function DynLayerClipBy(t,r,b,l) {
 this.clipTo(this.clipValues('t')+t,this.clipValues('r')+r,this.clipValues('b')+b,this.clipValues('l')+l)
}

function DynLayerClipValues(which) {
 if (is.ie) var clipv = this.css.clip.split("rect(")[1].split(")")[0].split("px")
 if (which=="t") return (is.ns)? this.css.clip.top : Number(clipv[0])
 if (which=="r") return (is.ns)? this.css.clip.right : Number(clipv[1])
 if (which=="b") return (is.ns)? this.css.clip.bottom : Number(clipv[2])
 if (which=="l") return (is.ns)? this.css.clip.left : Number(clipv[3])
}

DynLayer.prototype.clipInit = DynLayerClipInit
DynLayer.prototype.clipTo = DynLayerClipTo
DynLayer.prototype.clipBy = DynLayerClipBy
DynLayer.prototype.clipValues = DynLayerClipValues

// Write Method

function DynLayerWrite(html) {
 if (is.ns) {
  this.doc.open()
  this.doc.write(html)
  this.doc.close()
 }
 else if (is.ie) {
  this.event.innerHTML = html
 }
}

DynLayer.prototype.write = DynLayerWrite

// BrowserCheck Object

function BrowserCheck() {
 var b = navigator.appName
 if (b=="Netscape") this.b = "ns"
 else if (b=="Microsoft Internet Explorer") this.b = "ie"
 else this.b = b
 this.version = navigator.appVersion
 this.v = parseInt(this.version)
 this.ns = (this.b=="ns" && this.v>=4)
 this.ns4 = (this.b=="ns" && this.v==4)
 this.ns5 = (this.b=="ns" && this.v==5)
 this.ie = (this.b=="ie" && this.v>=4)
 this.ie4 = (this.version.indexOf('MSIE 4')>0)
 this.ie5 = (this.version.indexOf('MSIE 5')>0)
 this.min = (this.ns||this.ie)
}

is = new BrowserCheck()

var startTagFix = '</';
var msie_windows = 0;

function BrowserCheck() {
 var b = navigator.appName
 if (b=="Netscape") this.b = "ns"
 else if (b=="Microsoft Internet Explorer") this.b = "ie"
 else this.b = b
 this.v = parseInt(navigator.appVersion)
 this.ns = (this.b=="ns" && this.v>=4)
 this.ns4 = (this.b=="ns" && this.v==4)
 this.ns5 = (this.b=="ns" && this.v==5)
 this.ie = (this.b=="ie" && this.v>=4)
 this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
 this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
 if (this.ie5) this.v = 5
 this.mac = (navigator.appVersion.indexOf("Mac") != -1 )
 this.min = (this.ns||this.ie)
}

// automatically create the "is" object

is = new BrowserCheck()

function init() {
 DynLayerInit();
 setTimeout("resizeDiv()",1)
}

// Netscape Resize Fix

if (is.ns) {
 widthCheck = window.innerWidth
 heightCheck = window.innerHeight
 window.onResize = resizeFix()
}

function resizeFix() {
 //alert("resized")
 if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
 document.location.href = document.location.href
}

function resizeDiv() {
 if (is.ie && is.mac) {
  document.all.fixItDiv.style.height = 10;  //10 is an arbitrary figure
 }
}

window.onError = null


