// javascript:popup('Link',Width,Height,Window Title);
function popup(url,windowWidth,windowHeight,windowTitle){
	if (windowWidth == null) { windowWidth = 550 }
	if (windowHeight == null) { windowHeight = 500 }
	
	var newWindow = null;
	newWindow=window.open('','newWindow','width=' + windowWidth + ',height=' + windowHeight + ',status=no,toolbar=no,menubar=no,directories=no,location=no,scrollbars=yes,resizable=yes,alwaysRaised=yes,screenX=20,screenY=5,titlebar=yes,z-lock=yes,left=20,top=130');
	if (newWindow != null) {
		if (newWindow.opener == null){ newWindow.opener = self; } 
		if (windowTitle != "") { newWindow.document.title=windowTitle; }
		newWindow.location.href=url;
		newWindow.focus();
	}
}

// Show/Hide Logo
function showhideLogo(img)
{
	if (document.images)
	{
		var image = new Image
		image.src = img
		var display_width = 108;
		var display_height = (display_width * image.height) / image.width;
		document['preview'].src = image.src;
		document['preview'].width = display_width;
		document['preview'].height = display_height;
	}
}


// Display Scroll - Start
var agt = navigator.userAgent.toLowerCase();
var isOperaSpy = (agt.indexOf("opera") != -1) ? 1 : 0;

function scrollSpy(theFunction) {
  var NameOfThisSpy = generateSpyInternalName();
  
  eval('window.' + NameOfThisSpy + ' = this;'); // window.RANDOMNAME = <this_spy>
  eval('this.name = "' + NameOfThisSpy + '";'); // <this_spy>.name = "RANDOMNAME"

  this.changeFunction = theFunction;
  this.intervalTime = 200;   // by default 200 milliseconds
  this.enabled = 0;
  this.monitor = monitorScrolling;

  this.getWindowYOffset = getWindowYOffsetSpy;
  this.prevWindowYOffset = 0;

 /// public interface:  

  this.start = startSpy;
  this.stop = stopSpy;
  this.isRunning = isRunningSpy;
  
  this.getIntervalTime = getIntervalTimeSpy;
  this.setIntervalTime = setIntervalTimeSpy;

 /////
}

function startSpy() {
  if (!this.enabled) { // not already running?

    var cmdstring = 'window.' + this.name + '.monitor()';
    
    if (!isOperaSpy)
      this.interval = window.setInterval( cmdstring, this.intervalTime );
    else // work around bug
      this.interval = window.setTimeout( cmdstring, this.intervalTime );

    this.enabled = 1;
  }
}

function stopSpy() {
  if (this.enabled) { // really running?
    window.clearInterval(this.interval);
    this.enabled = 0;
  }
}

function isRunningSpy() {
  return this.enabled;
}

    

function getIntervalTimeSpy() {
  return this.intervalTime;
}

function setIntervalTimeSpy(newValue) {
  var wasRunning = (this.enabled) ? 1 : 0;
  this.stop();
  this.intervalTime = newValue;
  if (wasRunning)
    this.start();
}



function getWindowYOffsetSpy() {

  if ( window.pageYOffset || window.pageYOffset == 0 )
    return window.pageYOffset;

  if ( document.body ) {
    if ( document.body.scrollTop || document.body.scrollTop == 0 ) {

      if ( document.documentElement ) {
        if ( document.documentElement.scrollTop || document.documentElement.scrollTop == 0 ) {
          // IE 6 uses document.documentElement.scrollTop instead of
          // document.body.scrollTop. Has to do with viewpoints -
          // see some w3 spec ;-)
          return document.body.scrollTop + document.documentElement.scrollTop;
        }

      } else {
        return document.body.scrollTop;
      }
    }
  }
}
  
function monitorScrolling() {

  var newWinYOffset = getWindowYOffsetSpy();
  var Scrolled = (newWinYOffset != this.prevWindowYOffset);

  this.prevWindowYOffset = newWinYOffset;

  if (Scrolled)
    eval( 'this.changeFunction(' + newWinYOffset + ')' );

  if (isOperaSpy) {  // work around bug
    var cmdstring = 'window.' + this.name + '.monitor()';
    this.interval = window.setTimeout( cmdstring, this.intervalTime);
  }
    
}



function generateSpyInternalName() {
  var now = new Date();
  var rand = Math.floor(  1000000 * Math.random(now.getTime())  );
  return ('spy' + rand + 's');
}
// Display Scroll - End





	<!--
	
	/// Part of Opera browser detection script copied from 
	/// http://developer.netscape.com/docs/examples/javascript/browser_type.html
	
	var agt = navigator.userAgent.toLowerCase();
	var isOpera = ( (agt.indexOf("opera") != -1)
	                 && document.getElementById   ) ? 1 : 0;
	
	
	var isNav4 = (document.layers && !isOpera) ? 1 : 0;
	var isIE4  = (document.all && !isOpera) ? 1 : 0;
	
	var isMoz  = ( document.getElementById && !(isNav4 || isIE4 | isOpera) ) ? 1 : 0;
	/// if (isMoz == 1), assume it's one of:
	 ///  - Mozilla 
	 ///  - Opera 5, set to be identified as 'Mozilla X',
	 ///    with X one of (5.0; 4.76; 3.0)
	
	/// following not needed anymore, because we have "isOpera" now
	 /// var isOpera5IE5 = ( document.all && (window.pageYOffset || window.pageYOffset == 0) ) ? 1 : 0;
	 //// if (isOpera5IE5 == 1), then assume browser is Opera set to
	 /// identify as 'MSIE 5' although it does not support all properties of it
	 
	
	
	/// Netscape 4 Resize Fix
	/// Copied from Dan Steinman's "Dynamic Duo" site:
	/// http://www.dansteinman.com/dynduo/en/widthheight.html
	
	if (isNav4) {
	  widthCheck = window.innerWidth;
	  heightCheck = window.innerHeight;
	  window.onResize = resizeFix;
	}
	
	function resizeFix() {
	  if ( widthCheck != window.innerWidth || heightCheck != window.innerHeight )
	    document.location.href = document.location.href;
	} 
	
	
	
	
	function setTop(layer, t) {
		if (t < 500) { 
	  if (isNav4)
	    layer.top = t;
	  else
	    if (isIE4)
		 layer.style.pixelTop = t;
	    else
		  if (isMoz) {
		    var p = '' + t + 'px';
			layer.style.top = p;
		  }
		  else
		    if (isOpera)          
			  layer.style.top = t;
	}
	}

	
	function getDiv(divname) {
		// given name 'divname', return div object
		// if div is within otherdiv, use 'otherdivname.divname' format as parameter
	
		divs = divname.split('.'); 
	
		if (isNav4) {
			s = ''
			for (i = 0; i < divs.length; i++) {
				s += 'document.layers.' + divs[i];
				if (i < divs.length - 1) 
					s += '.';
			}		
			return  eval(s);
		}
	
		if (isIE4)
			return eval( 'document.all.' + divs[ divs.length-1 ] );
	
		if (isMoz || isOpera)
			return document.getElementById(divs[ divs.length-1 ] );
	
	}
	
	function update(scrollPos) {
	  thediv = getDiv('A');
	  setTop(thediv, scrollPos);
	}
	
	var S;
	  
	function initSpy() {  
	  S = new scrollSpy(update);
	  S.start();
	}
	
	
	// -->

