
function checkForm(formToCheck,fieldsToCheck) 
{
	var errorCount = 0;
	var emailErrorCount = 0;
	var errorMessage = "The form could not be submitted because of the following error(s): \n\n";
	var i;
	var invalidField;
	var f = null
	eval('f=document.'+formToCheck);
	if(f==null){
  	alert('Incorrect form name specified: '+formToCheck);
  	return false;
	}
	for (i = f.elements.length-1; i >=0 ; i--)
	{
		if (f.elements[i].type != "hidden" && fieldsToCheck.indexOf(f.elements[i].name) > -1 && (f.elements[i].value == "" || f.elements[i].value == "invalid")) 
		{
			errorCount++;
			invalidField = f.elements[i];
		}
		if (f.elements[i].name.toUpperCase().indexOf("SENDMEMAIL") <= -1 && f.elements[i].name.toUpperCase().indexOf("EMAIL") > -1 && fieldsToCheck.indexOf(f.elements[i].name) > -1 && !isEmail(f.elements[i].value))
		{
			emailErrorCount++;
			invalidField = f.elements[i];
		}
		//is B'day required?
		if(f.elements[i].name.toUpperCase().indexOf("BIRTHDAY") > -1 && fieldsToCheck.indexOf(f.elements[i].name) > -1 && !isDate(f.elements[i].value))
		{
			f.elements[i].focus();
			return false;
		}
		//even if B'day not required, make sure the data is valid if entered
		if(f.elements[i].name.toUpperCase().indexOf("BIRTHDAY") > -1 && f.elements[i].value.length > 0 && !isDate(f.elements[i].value))
		{
			f.elements[i].focus();
			return false;
		}		
	}
	if (errorCount > 1)
		errorMessage += "There were " + errorCount + " required fields left empty.\n";
	else if (errorCount == 1)
		errorMessage += "There was " + errorCount + " required field left empty.\n";
	if (emailErrorCount > 1)
		errorMessage += "All email addresses must be valid. There were " + emailErrorCount + " email fields invalid.\n";	
	else if (emailErrorCount == 1)		
		errorMessage += "All email addresses must be valid. There was " + emailErrorCount + " email field invalid.\n";		
	if (errorCount > 0 || emailErrorCount > 0)
	{
		alert(errorMessage + "\nPlease click OK to try again.");
		invalidField.focus();
		return false;
	}
	else
		return true;
}


function bookmark (fsURL, fsName) {
	//is it Internet Explorer
	if ((navigator.appVersion.indexOf("MSIE")>0)&&(parseInt(navigator.appVersion)>=4)) 
		window.external.AddFavorite(fsURL,fsName); 
	else
		alert("Bookmarks can only be added automatically if you are\nusing Internet Explorer 4 or greater. Please press Ctrl+D \nor Ctrl+B to bookmark the site manually or consult \nyour browser documentation for more information.");
}

function openCenteredWindow(url, height, width, name, parms) {
   var left = Math.floor( (screen.width - width) / 2);
   var top = Math.floor( (screen.height - height) / 2);
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
   if (parms) 
   { 
     winParms += "," + parms; 
   }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4) 
   { 
     win.window.focus(); 
   }
   //return win;
}
function getCenteredWindow(url, height, width, name, parms) {
   var left = Math.floor( (screen.width - width) / 2);
   var top = Math.floor( (screen.height - height) / 2);
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
   if (parms) 
   { 
     winParms += "," + parms; 
   }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4) 
   { 
     win.window.focus(); 
   }
   return win;
}



function swapImgRestore() { //v3.0

  if (document.MM_sr != null)
  {
  	var i,x,a=document.MM_sr; 
	for(i=0; a && i<a.length && (x=a[i]) && x.oSrc; i++)
	{
  		x.src=x.oSrc;
	}
  }
}

function findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() { //v3.0
  shouldSwapImagesFlag = false;
  swapImgRestore();
  var i,j=0,x,a=swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
  if ((x=findObj(a[i]))!=null)
  {
  	document.MM_sr[j++]=x; 
  	if(!x.oSrc) 
  		x.oSrc=x.src; 
  	x.src=a[i+2];
  }
}

function Replace(sString, sReplaceThis, sWithThis) {
if (sReplaceThis != "" && sReplaceThis != sWithThis) {
var counter = 0;
var start = 0;
var before = "";
var after = "";
while (counter<sString.length) {
start = sString.indexOf(sReplaceThis, counter);
if (start == -1) {
break;
} else {
before = sString.substr(0, start);
after = sString.substr(start + sReplaceThis.length, sString.length);
sString = before + sWithThis + after;
counter = before.length + sWithThis.length;
}
}
}
return sString;
}


function printDiv(fsDivId){
  var ss = getId(fsDivId).innerHTML
  var d = window.open('about:blank')
  d.document.open();
  d.document.write(ss);
  d.document.close();
  d.focus();
  d.print();
  d.close();
}

function printDivExt(fsDivId, fsTitle, fsCss){
  var ss = getId(fsDivId).innerHTML
  var d = getCenteredWindow('about:blank', 400, 490, 'printme', 'scrollbars=no') //window.open('about:blank')
  d.document.open();
  d.document.write('<html><head><title>' + fsTitle + '</title></head>');
  if(fsCss!='')d.document.write('<link rel="stylesheet" type="text/css" href="' + fsCss + '">');
  d.document.write('<body style="background-image:none;background-color:white;">');
  d.document.write('<div style="width:' + getId(fsDivId).style.width + '">');
  d.document.write(ss);
  d.document.write('</div></body></html>');
  d.document.close();
  d.focus();
  d.print();
  d.close();
}




function SureClientWidth() {
	return filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
function SureClientHeight() {
	return filterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}
function SureScrollLeft() {
	return filterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}
function SureScrollTop() {
	return filterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}
function filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}


if (document.layers) { // Netscape
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = captureMousePosition;
} else if (document.all) { // Internet Explorer
    document.onmousemove = captureMousePosition;
} else if (document.getElementById) { // Netcsape 6
    document.onmousemove = captureMousePosition;
}
// Global variables
xMousePos = 0; // Horizontal position of the mouse on the screen
yMousePos = 0; // Vertical position of the mouse on the screen
xMousePosMax = 0; // Width of the page
yMousePosMax = 0; // Height of the page

function captureMousePosition(e) {
    if (document.layers) {
        // When the page scrolls in Netscape, the event's mouse position
        // reflects the absolute position on the screen. innerHight/Width
        // is the position from the top/left of the screen that the user is
        // looking at. pageX/YOffset is the amount that the user has
        // scrolled into the page. So the values will be in relation to
        // each other as the total offsets into the page, no matter if
        // the user has scrolled or not.
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = SureClientWidth()+SureScrollLeft();
        yMousePosMax = SureClientHeight()+SureScrollTop();
    } else if (document.all) {
        // When the page scrolls in IE, the event's mouse position
        // reflects the position from the top/left of the screen the
        // user is looking at. scrollLeft/Top is the amount the user
        // has scrolled into the page. clientWidth/Height is the height/
        // width of the current page the user is looking at. So, to be
        // consistent with Netscape (above), add the scroll offsets to
        // both so we end up with an absolute value on the page, no
        // matter if the user has scrolled or not.
        //document.getElementById('testdiv').innerHTML = 'wex: ' + window.event.x + '; wey: ' + window.event.y + '; sl: ' + SureScrollLeft() + '; st: ' + SureScrollTop() + '; cw: ' + SureClientWidth() + '; ch: ' + SureClientHeight() + ';;\n';
        //document.body.appendChild(tn) 
        //if(document.documentElement){
        //  xMousePos = window.event.x + document.documentElement.scrollLeft;
        //  yMousePos = window.event.y //+document.documentElement.scrollTop;
        //  xMousePosMax = document.body.clientWidth+document.documentElement.scrollLeft;
        //  yMousePosMax = document.body.clientHeight+document.documentElement.scrollTop;
        //} else {
          xMousePos = window.event.x + SureScrollLeft();
          yMousePos = window.event.y //+ SureScrollTop();
          xMousePosMax = SureClientWidth() + SureScrollLeft();
          yMousePosMax = SureClientHeight() + SureScrollTop();
        //}
    } else if (document.getElementById) {
        //var tn = document.createTextNode('pgx: ' + e.pageX + '; pgy: ' + e.pageY + '; wiw: ' + window.innerWidth + '; wih: ' + window.innerHeight + '; pxo: ' + window.pageXOffset + '; pyo: ' + window.pageYOffset + ';');
        //document.body.appendChild(tn) 
        // Netscape 6 behaves the same as Netscape 4 in this regard
        xMousePos = e.pageX;
        yMousePos = e.pageY;
        xMousePosMax = SureClientWidth()+SureScrollLeft();
        yMousePosMax = SureClientHeight()+SureScrollTop();
    }
}


function doFieldDistribution(obj, fsFields) {
  var arFields = fsFields.split(',');
  var objname = obj.id;
  var objvalue = obj.value;
  var arValues = objvalue.split(',');
  var d = null;
  var a = 0;
  if(objvalue==''||objvalue=='-'){
    for(a=0;a<arFields.length;a++){
      d = getId(objname + '_' + arFields[a]);
      if(d)d.value='';
    }
  } else {
    if(arFields.length==arValues.length){
      for(a=0;a<arFields.length;a++){
        d = getId(objname + '_' + arFields[a]);
        if(d)d.value=arValues[a];
      }
    }
  } 
  obj.selectedIndex=0;
}

function popupCenter(url, height, width, name, parms) {
   var left = Math.floor( (screen.width - width) / 2)
   var top = Math.floor( (screen.height - height) / 2)
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width
   //var winParms = "top=200,left=200,height=400,width=300"
   if (parms)winParms += "," + parms
   var win = window.open(url, name, winParms)
   if (parseInt(navigator.appVersion) >= 4)win.window.focus()
   return win
}



function printFlash(fsPath, fsW, fsH, fsWMode, fsQuality, fsVersion){
	if(fsVersion=='')fsVersion='7,0,68,0';
	if(fsQuality=='')fsQuality='best';
	if(fsWMode=='')fsWMode='none';
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ fsVersion + '" width="' + fsW + '" height="' + fsH + '"><param name="movie" value="' + fsPath + '" /><param name="quality" value="' + fsQuality + '" /><param name="wmode" value="'+ fsWMode +'"><embed src="' + fsPath + '" quality="' + fsQuality + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="'+ fsWMode +'" width="' + fsW + '" height="' + fsH + '"></embed></object>');
}

function printFlashVideo(fsLib, fsFile, fsW, fsH, fsSkin){
  
  var sPath = SiteResPath + "images/" + fsLib + "/" + escape(fsFile) //escape(Replace(fsFile,".flv",""))
  var sSkin = "Halo_Skin_1"
  if(fsSkin!='')sSkin = fsSkin
	sPath = SiteResPath + 'media.asp?flv=' +escape(sPath)
  var sW = '220'
  var sH = '180'
  if(fsW!='')sW=fsW
  if(fsH!='')sH=fsH
	//prompt('PRINT',
	//alert(sPath)
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,68,0" width="' + sW + '" height="' + sH + '" id="FLVPlayer"><param name="movie" value="/_lib/flash/flvplayer_progressive.swf" /><param name="salign" value="lt" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="skinAutoHide" value="true" /><param name="FlashVars" value="&MM_ComponentVersion=1&skinAutoHide=true&skinName=/_lib/flash/' + escape(sSkin) + '&streamName=' + sPath + '&autoPlay=true&autoRewind=true" /><embed src="/_lib/flash/flvplayer_progressive.swf" flashvars="&MM_ComponentVersion=1&skinAutoHide=true&skinName=/_lib/flash/' + escape(sSkin) + '&streamName=' + sPath + '&autoPlay=true&autoRewind=true" quality="high" scale="noscale" width="' + sW + '" height="' + sH + '" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>')
}

function getId(fsEl){
	return document.getElementById(fsEl);
}

function out(fsStr){
	document.write(fsStr);
}

function classStyle(fsStr){
	if(fsStr!='')if(fsStr.indexOf(";")>0){
		return ' style="'+fsStr+'" ';	
	} else {
		return ' style="'+fsStr+'" ';
	}
	return '';
}
function htmlattr(fsName,fsValue){
	if(fsValue!='')return ' ' + fsName + '="' + fsValue + '" '
	return ''
}
function div(fsId, fsClassStyle, fsContent, fsAccessKey, fsDown, fsClick, fsUp, fsOver, fsOut) {	
		return '<div '+htmlattr('accesskey',fsAccessKey)+'" id="' +fsId + '"'+classStyle(fsClassStyle)+htmlattr('onmousedown',fsDown)+
	       htmlattr('onclick',fsClick)+htmlattr('onmouseup',fsUp)+htmlattr('onmouseover',fsOver)+htmlattr('onmouseout',fsOut)+'>'+fsContent +'</div>';
}
function nbsp(){
	return '&nbsp;'
}
function libimg(sImgName){
	return '<img src="/_lib/' + sImgName + '" />'
}
function AjaxObj(){
	if(typeof(XMLHttpRequest)!='undefined')
		return new XMLHttpRequest();

	var axO=['Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.4.0',
		'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'], i;
	for(i=0;i<axO.length;i++)
		try{
			return new ActiveXObject(axO[i]);
		}catch(e){}
	return null;
}
function AjaxGet(fsPath){
	var oXML = AjaxObj();
	oXML.open('GET', fsPath, false);
	oXML.send('');
	return  oXML.responseText;
}
function AjaxGet(fsPath){
	var oXML = AjaxObj();
	oXML.open('GET', fsPath, false);
	oXML.send('');
	return  oXML.responseText;
}

function showFloatingMedia(obj, imagefile, border){
try {
  if(imagefile.indexOf('no_image')>0)return;
    var sHtml = '<img src="' + imagefile + '" width="400" />'
  var pT = document.createElement('div')
  pT.id = 'js_floating_media_x'
  pT.onmousemove = function() { alignFloatingMedia(); }
  pT.style.zIndex = 511;
  pT.style.backgroundColor = 'white';
  pT.style.backgroundImage = 'url(/_lib/loading.gif)';
  pT.style.backgroundPosition = 'top center';
  pT.style.backgroundRepeat = 'no-repeat';
  if(border==null||border==''){
    pT.style.border = '9px #FF00FF ridge';
  } else {
    pT.style.border = border;
  }
  pT.style.width='auto';
  pT.style.position='absolute';
  pT.style.top='0px';
  pT.style.left='0px';
  pT.style.margin='auto';
  pT.style.display='none';
  pT.style.zIndex = 511;
  pT.innerHTML = sHtml
  document.body.appendChild(pT)
  //document.body.insertAdjacentHTML ("beforeEnd", sHtml);
  setTimeout('alignFloatingMedia()',20)
} catch(ex) {
  alert(ex.message)
}
}

function alignFloatingMedia() {
  var fm = getId('js_floating_media_x');
  if(fm){
    fm.style.display='block';    
    var ht = fm.offsetHeight
    var wd = fm.offsetWidth
    var oht = ((SureClientHeight()-ht)/2) + SureScrollTop();
    if(xMousePos>(SureClientWidth()/2)+40){
      fm.style.left = (xMousePos-40-wd) +'px';
      fm.style.top = oht +'px';
    }else{
      fm.style.left = 40 + xMousePos +'px';
      fm.style.top = oht +'px';
    }
    fm.style.display='block';
  }
}

function hideFloatingMedia(){
  try {
  var fm = getId('js_floating_media_x');
  if(fm)fm.parentNode.removeChild(fm); //document.body.removeElement(fm);
  //var sHtml = '<div id="js_floating_media_x" style="z-index:512;width:auto;position:absolute;display:inline;"><img src="' + imagefile + '" /></div>'
  //document.body.insertAfter(sHtml);
} catch(ex) {
  alert(ex.message)
}
}

function setStyle(fObj, fsProp, fsVal){
	eval('fObj.style.'+fsProp+'=\''+ fsVal + '\'')
}
function divscale(fiLeft,fiTop,fiWidth,fiHeight){
	var sdivsc = ''
	if(fiLeft!='')sdivsc+='left:'+fiLeft+';';
	if(fiTop!='')sdivsc+='top:'+fiTop+';';
	if(fiWidth!='')sdivsc+='width:'+fiWidth+';';
	if(fiHeight!='')sdivsc+='height:'+fiHeight+';';
	return sdivsc
}
// div = fsId, fsClassStyle, fsContent, fsAccessKey, fsDown, fsClick, fsUp, fsOver, fsOut
function _is(){
	var sUA = navigator.userAgent
	this.DOM = (document.getElementById)
	this.XML = (typeof(XMLHttpRequest)!='undefined')
	this.GECKO = (sUA.indexOf('Gecko')>0)
	
	this.IE7 = (sUA.indexOf('MSIE 7')>0);
	this.IE6 = (sUA.indexOf('MSIE 6')>0);
	this.IE55 = (sUA.indexOf('MSIE 5.5')>0);
	this.IE5 = (sUA.indexOf('MSIE 5')>0);
	this.IE4 = (!this.DOM&&document.all);
	this.IE = this.IE7 || this.IE6 || this.IE55 || this.IE5 || this.IE4;
	this.OP = (sUA.indexOf('Opera')>0);
	this.FF2 = (sUA.indexOf('Firefox/2')>0);
	this.FF15 = (sUA.indexOf('Firefox 1.5')>0);
	this.FF12 = (sUA.indexOf('Firefox 1.2')>0);
	this.FF1 = (sUA.indexOf('Firefox 1.0')>0);
	this.FF = this.FF2 || this.FF15 || this.FF12 || this.FF1;
	this.NN = (sUA.indexOf('Netscape')>0);
	this.SF = (sUA.indexOf('Safari')>0);
	this.NN4 = (document.layer);
}
is = new _is;

function wk_cn(obj, cn) {
  obj.className = cn
}

function getStyleDiv(fObj,fsProp,fsVal){
}
function styleDiv(fObj,fsProp,fsVal){
}
function getSizeDiv(fObj,fX,fY,fbInc){
}
function sizeDiv(fObj,fX,fY,fbInc){
}
function moveDiv(fObj,fX,fY,fbInc){
}
function moveDiv(fObj,fX,fY,fbInc){
}
function opacDiv(fObj, fnPC){
    //alert(fObj.id + " = " + fnPC)
    fObj.style.opacity = parseFloat(fnPC) //(opacity / 100);
    fObj.style.MozOpacity = fnPC //(opacity / 100);
    fObj.style.KhtmlOpacity = fnPC //(opacity / 100);
    fObj.style.filter = "alpha(opacity=" + parseInt(fnPc*100) + ")";
}

function incTimeline(fsName){
	//var tobj = null;
	eval(fsName+'.inc();');
	//tobj.inc();
}
function clsTimeline(fsName, fiMSDuration){
  this.running = false;
  this.timerInc = 0;
  this.timerPos = 0;
  this.timerLimit = -1;
  this.timerObj = 0;
  this.timers = new Array()
  this.timerCount = -1;
  this.timerName = fsName;
  this.ininc = false;
  this.duration = fiMSDuration;
  this.add = function(foTmr){
	  this.timerCount += 1;
	  this.timers[this.timerCount] = foTmr
	  //alert('add:' + this.timers[this.timerCount].divName + ':' + this.timerCount);
  }
  this.run = function(fiMilliSecs,fiSteps){
	  if(this.running)return;
	  this.running = true
      try {
	    this.timerInc = parseInt(fiMilliSecs/fiSteps)
	  } catch(e) {
      }
	  try {
    	  var a = 0
    	  for(a=0;a<=this.timerCount;a++){
    	    this.timers[a].start();
    	  }
      } catch(e) {
	  }      
	  if(this.timerInc>0&&this.timerCount>-1){
	    this.timerLimit = fiSteps
	    this.timerObj = setInterval('incTimeline(\''+this.timerName+'\')',this.timerInc, this.timerName)
	    //alert('set:'+this.timerInc)
      }
      if(this.timerObj==null||this.timerObj==0){
         //do last step and exit
         //alert('failed:'+this.timerInc+':'+this.timerCount)
      }
	  this.running = false
  }
  this.inc = function(){
      this.timerPos+= 1
      if(this.ininc)return;
      this.ininc=true;
	  var a = 0;
	  var pC = 0;
	  try {
	    pC = this.timerPos/this.timerLimit;
      } catch(e) {
	  }
	  try {
    	  for(a=0;a<=this.timerCount;a++){
    	    this.timers[a].inc(pC);
    	  }
      } catch(e) {
	  }
	  if(this.timerPos>=this.timerLimit){
	    this.running = false;
	    window.clearInterval(this.timerObj);
	    this.timerObj = 0;
	    this.timerPos = 0;
	  }
	  //alert('inc:'+this.timerName+':'+this.timerPos)
      this.ininc=false;
  }
}
function clsTimer(fsDiv,fsEffect,fiStartValue,fiEndValue,fiBeginTimePC,fiFinishTimePC) {
	this.running = false;
	this.begin = fiBeginTimePC;
	this.finish = fiFinishTimePC;
	this.divName = fsDiv;
	this.effect = fsEffect;
	this.startValue = fiStartValue;
	this.endValue = fiEndValue;
	this.start = function(){
        var divobj = getId(this.divName);
	    try{
    	    opacDiv(divobj, this.startValue)
	   } catch(e) {
	   }
   	   divobj.style.visibility='visible';
    }
	this.inc = function(fiPC){
            var divobj = getId(this.divName);
    	//alert('2inc2:'+divobj+':'+fiPC+':'+this.effect)
            if(this.effect=='opacity'){
                var newopac = fiStartValue + (fiEndValue*fiPC)
                //alert(newopac);
        	    if(newopac==0){
            	    divobj.style.visibility='hidden';
            	    opacDiv(divobj,newopac)
        	    } else {
            	    opacDiv(divobj,newopac)
            	}
            }
  
    }
}
var mTL = new clsTimeline('mTL',50);
mTL.add(new clsTimer('tw_tbr','opacity',0,1,0,1));


function clsPopup(){
  this.X = 0;	
  this.Y = 0;	
  this.W = 0;	
  this.H = 0;	
  this.src = '';  //specify value to load another file in popup	
  this.value = '&nbsp;';	
  
}


function movediv(fsWay, fsName, fsUnder) {
	//firefox only currently
	var parentElem = ''
	var offset = 0
	try {
		if(fsUnder!=''){
			parentElem=getId(fsUnder);
			if(parentElem)offset = parseInt(parentElem.style.height)+parseInt(parentElem.style.top)
		}
		var divElem = getId(fsName);
		if(divElem){
		  switch(fsWay){
			case 'bottom':
				if(offset>0){
					divElem.style.top = (offset + window.innerHeight - parseInt(divElem.style.height)) + 'px';
				} else {
					divElem.style.top = (offset + window.innerHeight - parseInt(divElem.style.height)) + 'px';
				}
			case 'top':
				if(offset>0){
					divElem.style.top = (offset) + 'px';
				} else {
					divElem.style.top = (window.scrollY) + 'px';
				}
	  }
		}
	} catch(e) {
	}
}

function resizeAll() {
	
	movediv('top','tw_tbr','')
	movediv('top','tw_dlg','tw_tbr');
	movediv('top','tw_cnf','tw_dlg');
}

function superdiv(fsName,fsL,fsT,fsW,fsH){
	var fsC = '<ifr'+'ame name=\"tww_'+fsName+'\" id=\"tww_'+fsName+'\" scrolling=\"no\" style=\"width:100%;height:100%;\" frameborder=\"0\" src=\"/_lib/toolbar/_dlg/failed/\"></ifr'+'ame>';
	return div(fsName,'position:absolute;visibility:hidden;z-order:100;border-bottom:1px gray solid;background-image:url(/_lib/toolbar/_dlg/bkg.jpg);left:'+fsL+';top:'+fsT+';width:'+fsW+';height:'+fsH+';',fsC,'','','','','','');
}

function objToolbar(){
	this.divName = 'toolbar_div';
	this.init = objToolbar_init;
	this.loggedIn = false;
	this.show = objToolbar_show;
}
function objToolbar_init(){
	out( div(this.divName + '_start','position:absolute;z-index:10;display:block;'+divscale('0px','0px','32px','34px'),nbsp(),'1','', 'toolbar.show();','','this.style.backgroundImage=\'url(/_lib/toolbar/btn_icon.gif)\';','this.style.backgroundImage=\'none\';' ) );
	out( superdiv('tw_cnf','0px','238px','250px','120px') );
	out( superdiv('tw_dlg','0px','37px','300px','200px') );
	out( superdiv('tw_tbr','0px','0px','100%','36px') );
}
function objToolbar_show(){
	if(this.loggedIn){
		popupToolbar()
		//alert('you ARE logged in')
	} else {
		mTL.run(200,10);
		//popup('logon',0)
		//alert('you are not logged in')
	}
}
var toolbar = new objToolbar();

// redefine the superdiv concept
// popup object - allow animation and easy configuration and communication with page elements
// can fade, animate dimensions, and do so simultaneously - timers - can auto offset position if parent element is invisible
//also while scrolling - controls disappear, only to reappear after pausing for half a second - use synchronised fade of popups
//parent element is optional to offset top position - or otherwise popup may be completely absolutely positioned - reuse for website menus


function popup(fsName,fiX){
	var dlg = getId('tw_dlg');
	var dlgWin = getId('tww_tw_dlg');
	dlgWin.src = '/_lib/toolbar/_dlg/'+fsName+'/';
	dlg.style.visibility='visible';
	getId('tw_tbr').style.visibility='visible';
	getId('tw_cnf').style.visibility='visible';
	getId('tw_spacer').style.display='block'
}
function popupToolbar(){
}

function resizeDiv(fsDivId,fiWidth,fiHeight){
  if(!isNaN(fiWidth))getId(fsDivId).style.width = fiWidth + 'px';
  if(!isNaN(fiHeight))getId(fsDivId).style.height = fiHeight + 'px';
}


// All code above this point is Copyright 2007 Glenn Wallace @ SMART SANDS





// Functions below are Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
// Copyright 2001-2007 Michael Foster (Cross-Browser.com)
// Derivative functions included here are Copyright 2007 SMART SANDS, though also under the terms of the GNU LGPL

function xPanel(fsId,fiX,fiY,fiW,fsURL){
  if (document.getElementById && document.createElement &&
      document.body && document.body.appendChild) { 
    var e = document.createElement('IFRAME');
    this.ele = e;
    e.id = fsId;
    e.style.position = 'fixed';
    e.style.zIndex = '900';
    e.src = fsURL;
    document.body.appendChild(e);
    e.style.height = xClientHeight() - 50 + "px"
    e.style.width = fiW + "px"
    e.frameborder = "1"
    this.slideTime = 300; 
    //xMoveTo(e, fiX, fiY-1000);
    e.style.visibility = 'visible';
    //xSlideTo(e, fiX, fiY, this.slideTime);
    xMoveTo(e, fiX, fiY);
  } 
}
xPanel.prototype.toggleShowHide = function(fiW)
{
  this.ele.style.height = xClientHeight() - 50 + "px"
  this.ele.style.width = fiW + "px"
  if(this.ele.style.display=='none'){
     this.show()
  }else{
     this.hide()
  }
};
xPanel.prototype.show = function()
{
  this.ele.style.display = 'block';
};
xPanel.prototype.hide = function()
{
  this.ele.style.display = 'none';
};


function xPopup(sTmrType, uTimeout, sPos1, sPos2, sPos3, sStyle, sId, sUrl)
{
  if (document.getElementById && document.createElement &&
      document.body && document.body.appendChild)
  { 
    // create popup element
    //var e = document.createElement('DIV');
    var e = document.createElement('IFRAME');
    this.ele = e;
    e.id = sId;
    e.style.position = 'absolute';
    if(sStyle!='')e.className = sStyle;
    //e.innerHTML = sHtml;
    e.src = sUrl;
    document.body.appendChild(e);
    e.style.visibility = 'visible';
    this.tmr = xTimer.set(sTmrType, this, sTmrType, uTimeout);
    // init
    this.open = false;
    this.margin = 10;
    this.pos1 = sPos1;
    this.pos2 = sPos2;
    this.pos3 = sPos3;
    this.slideTime = 500; // slide time in ms
    this.interval();
  } 
} // end xPopup
// methods
xPopup.prototype.show = function()
{
  this.interval();
};
xPopup.prototype.hide = function()
{
  this.timeout();
};
// timer event listeners
xPopup.prototype.timeout = function() // hide popup
{
  if (this.open) {
    var e = this.ele;
    var pos = xCardinalPosition(e, this.pos3, this.margin, true);
    xSlideTo(e, pos.x, pos.y, this.slideTime);
    setTimeout("xGetElementById('" + e.id + "').style.visibility='hidden'", this.slideTime);
    this.open = false;
  }
};
xPopup.prototype.interval = function() // size, position and show popup
{
  if (!this.open) {
    var e = this.ele;
    var pos = xCardinalPosition(e, this.pos1, this.margin, true);
    xMoveTo(e, pos.x, pos.y);
    e.style.visibility = 'visible';
    pos = xCardinalPosition(e, this.pos2, this.margin, false);
    xSlideTo(e, pos.x, pos.y, this.slideTime);
    this.open = true;
  }
};

function xShow(e) {return xVisibility(e,1);}

function xVisibility(e, bShow)
{
  if(!(e=xGetElementById(e))) return null;
  if(e.style && xDef(e.style.visibility)) {
    if (xDef(bShow)) e.style.visibility = bShow ? 'visible' : 'hidden';
    return e.style.visibility;
  }
  return null;
}

function xGetElementById(e)
{
  if(typeof(e)=='string') {
    if(document.getElementById) e=document.getElementById(e);
    else if(document.all) e=document.all[e];
    else e=null;
  }
  return e;
}

function xDef()
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
  return true;
}

function xTimerMgr()
{
  this.tmr = null;
  this.timers = new Array();
}
// xTimerMgr Methods
xTimerMgr.prototype.set = function(type, obj, sMethod, uTime, data) // type: 'interval' or 'timeout'
{
  return (this.timers[this.timers.length] = new xTimerObj(type, obj, sMethod, uTime, data));
};
xTimerMgr.prototype.run = function()
{
  var i, t, d = new Date(), now = d.getTime();
  for (i = 0; i < this.timers.length; ++i) {
    t = this.timers[i];
    if (t && t.running) {
      t.elapsed = now - t.time0;
      if (t.elapsed >= t.preset) { // timer event on t
        t.obj[t.mthd](t); // pass listener this xTimerObj
        if (t.type.charAt(0) == 'i') { t.time0 = now; }
        else { t.stop(); }
      }  
    }
  }
};
xTimerMgr.prototype.tick = function(t) // set the timers' resolution
{
  if (this.tmr) clearInterval(this.tmr);
  this.tmr = setInterval('xTimer.run()', t);
};
// Object Prototype used only by xTimerMgr
function xTimerObj(type, obj, mthd, preset, data)
{
  // Public Properties
  this.data = data;
  // Read-only Properties
  this.type = type; // 'interval' or 'timeout'
  this.obj = obj;
  this.mthd = mthd; // string
  this.preset = preset;
  this.reset();
} // end xTimerObj constructor
// xTimerObj Methods
xTimerObj.prototype.stop = function() { this.running = false; };
xTimerObj.prototype.start = function() { this.running = true; }; // continue after a stop
xTimerObj.prototype.reset = function()
{
  var d = new Date();
  this.time0 = d.getTime();
  this.elapsed = 0;
  this.running = true;
};
var xTimer = new xTimerMgr(); // applications assume global name is 'xTimer'
xTimer.tmr = setInterval('xTimer.run()', 25);

function xCardinalPosition(e, cp, margin, outside)
{
  if(!(e=xGetElementById(e))) return;
  if (typeof(cp)!='string'){window.status='xCardinalPosition error: cp=' + cp + ', id=' + e.id; return;}
  var x=xLeft(e), y=xTop(e), w=xWidth(e), h=xHeight(e);
  var pw,ph,p = e.offsetParent;
  if (p == document || p.nodeName.toLowerCase() == 'html') {pw = xClientWidth(); ph = xClientHeight();}
  else {pw=xWidth(p); ph=xHeight(p);}
  var sx=xScrollLeft(p), sy=xScrollTop(p);
  var right=sx + pw, bottom=sy + ph;
  var cenLeft=sx + Math.floor((pw-w)/2), cenTop=sy + Math.floor((ph-h)/2);
  if (!margin) margin=0;
  else{
    if (outside) margin=-margin;
    sx +=margin; sy +=margin; right -=margin; bottom -=margin;
  }
  switch (cp.toLowerCase()){
    case 'n': x=cenLeft; if (outside) y=sy - h; else y=sy; break;
    case 'ne': if (outside){x=right; y=sy - h;}else{x=right - w; y=sy;}break;
    case 'e': y=cenTop; if (outside) x=right; else x=right - w; break;
    case 'se': if (outside){x=right; y=bottom;}else{x=right - w; y=bottom - h}break;
    case 's': x=cenLeft; if (outside) y=sy - h; else y=bottom - h; break;
    case 'sw': if (outside){x=sx - w; y=bottom;}else{x=sx; y=bottom - h;}break;
    case 'w': y=cenTop; if (outside) x=sx - w; else x=sx; break;
    case 'nw': if (outside){x=sx - w; y=sy - h;}else{x=sx; y=sy;}break;
    case 'cen': x=cenLeft; y=cenTop; break;
    case 'cenh': x=cenLeft; break;
    case 'cenv': y=cenTop; break;
  }
  var o = new Object();
  o.x = x; o.y = y;
  return o;
}

function xSlideTo(e, x, y, uTime)
{
  if (!(e=xGetElementById(e))) return;
  if (!e.timeout) e.timeout = 25;
  e.xTarget = x; e.yTarget = y; e.slideTime = uTime; e.stop = false;
  e.yA = e.yTarget - xTop(e); e.xA = e.xTarget - xLeft(e); // A = distance
  if (e.slideLinear) e.B = 1/e.slideTime;
  else e.B = Math.PI / (2 * e.slideTime); // B = period
  e.yD = xTop(e); e.xD = xLeft(e); // D = initial position
  var d = new Date(); e.C = d.getTime();
  if (!e.moving) _xSlideTo(e);
}
function _xSlideTo(e)
{
  if (!(e=xGetElementById(e))) return;
  var now, s, t, newY, newX;
  now = new Date();
  t = now.getTime() - e.C;
  if (e.stop) { e.moving = false; }
  else if (t < e.slideTime) {
    setTimeout("_xSlideTo('"+e.id+"')", e.timeout);

    s = e.B * t;
    if (!e.slideLinear) s = Math.sin(s);
//    if (e.slideLinear) s = e.B * t;
//    else s = Math.sin(e.B * t);

    newX = Math.round(e.xA * s + e.xD);
    newY = Math.round(e.yA * s + e.yD);
    xMoveTo(e, newX, newY);
    e.moving = true;
  }  
  else {
    xMoveTo(e, e.xTarget, e.yTarget);
    e.moving = false;
    if (e.onslideend) e.onslideend();
  }  
}

function xMoveTo(e,x,y)
{
  xLeft(e,x);
  xTop(e,y);
}

function xLeft(e, iX)
{
  if(!(e=xGetElementById(e))) return 0;
  var css=xDef(e.style);
  if (css && xStr(e.style.left)) {
    if(xNum(iX)) e.style.left=iX+'px';
    else {
      iX=parseInt(e.style.left);
      if(isNaN(iX)) iX=xGetComputedStyle(e,'left',1);
      if(isNaN(iX)) iX=0;
    }
  }
  else if(css && xDef(e.style.pixelLeft)) {
    if(xNum(iX)) e.style.pixelLeft=iX;
    else iX=e.style.pixelLeft;
  }
  return iX;
}

function xTop(e, iY)
{
  if(!(e=xGetElementById(e))) return 0;
  var css=xDef(e.style);
  if(css && xStr(e.style.top)) {
    if(xNum(iY)) e.style.top=iY+'px';
    else {
      iY=parseInt(e.style.top);
      if(isNaN(iY)) iY=xGetComputedStyle(e,'top',1);
      if(isNaN(iY)) iY=0;
    }
  }
  else if(css && xDef(e.style.pixelTop)) {
    if(xNum(iY)) e.style.pixelTop=iY;
    else iY=e.style.pixelTop;
  }
  return iY;
}

function xWidth(e,w)
{
  if(!(e=xGetElementById(e))) return 0;
  if (xNum(w)) {
    if (w<0) w = 0;
    else w=Math.round(w);
  }
  else w=-1;
  var css=xDef(e.style);
  if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    w = xClientWidth();
  }
  else if(css && xDef(e.offsetWidth) && xStr(e.style.width)) {
    if(w>=0) {
      var pl=0,pr=0,bl=0,br=0;
      if (document.compatMode=='CSS1Compat') {
        var gcs = xGetComputedStyle;
        pl=gcs(e,'padding-left',1);
        if (pl !== null) {
          pr=gcs(e,'padding-right',1);
          bl=gcs(e,'border-left-width',1);
          br=gcs(e,'border-right-width',1);
        }
        // Should we try this as a last resort?
        // At this point getComputedStyle and currentStyle do not exist.
        else if(xDef(e.offsetWidth,e.style.width)){
          e.style.width=w+'px';
          pl=e.offsetWidth-w;
        }
      }
      w-=(pl+pr+bl+br);
      if(isNaN(w)||w<0) return;
      else e.style.width=w+'px';
    }
    w=e.offsetWidth;
  }
  else if(css && xDef(e.style.pixelWidth)) {
    if(w>=0) e.style.pixelWidth=w;
    w=e.style.pixelWidth;
  }
  return w;
}

function xHeight(e,h)
{
  if(!(e=xGetElementById(e))) return 0;
  if (xNum(h)) {
    if (h<0) h = 0;
    else h=Math.round(h);
  }
  else h=-1;
  var css=xDef(e.style);
  if (e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    h = xClientHeight();
  }
  else if(css && xDef(e.offsetHeight) && xStr(e.style.height)) {
    if(h>=0) {
      var pt=0,pb=0,bt=0,bb=0;
      if (document.compatMode=='CSS1Compat') {
        var gcs = xGetComputedStyle;
        pt=gcs(e,'padding-top',1);
        if (pt !== null) {
          pb=gcs(e,'padding-bottom',1);
          bt=gcs(e,'border-top-width',1);
          bb=gcs(e,'border-bottom-width',1);
        }
        // Should we try this as a last resort?
        // At this point getComputedStyle and currentStyle do not exist.
        else if(xDef(e.offsetHeight,e.style.height)){
          e.style.height=h+'px';
          pt=e.offsetHeight-h;
        }
      }
      h-=(pt+pb+bt+bb);
      if(isNaN(h)||h<0) return;
      else e.style.height=h+'px';
    }
    h=e.offsetHeight;
  }
  else if(css && xDef(e.style.pixelHeight)) {
    if(h>=0) e.style.pixelHeight=h;
    h=e.style.pixelHeight;
  }
  return h;
}

function xClientWidth()
{
  var v=0,d=document,w=window;
  if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientWidth)
    {v=d.documentElement.clientWidth;}
  else if(d.body && d.body.clientWidth)
    {v=d.body.clientWidth;}
  else if(xDef(w.innerWidth,w.innerHeight,d.height)) {
    v=w.innerWidth;
    if(d.height>w.innerHeight) v-=16;
  }
  return v;
}

function xClientHeight()
{
  var v=0,d=document,w=window;
  if((!d.compatMode || d.compatMode == 'CSS1Compat') && !w.opera && d.documentElement && d.documentElement.clientHeight)
    {v=d.documentElement.clientHeight;}
  else if(d.body && d.body.clientHeight)
    {v=d.body.clientHeight;}
  else if(xDef(w.innerWidth,w.innerHeight,d.width)) {
    v=w.innerHeight;
    if(d.width>w.innerWidth) v-=16;
  }
  return v;
}

function xScrollLeft(e, bWin)
{
  var offset=0;
  if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    var w = window;
    if (bWin && e) w = e;
    if(w.document.documentElement && w.document.documentElement.scrollLeft) offset=w.document.documentElement.scrollLeft;
    else if(w.document.body && xDef(w.document.body.scrollLeft)) offset=w.document.body.scrollLeft;
  }
  else {
    e = xGetElementById(e);
    if (e && xNum(e.scrollLeft)) offset = e.scrollLeft;
  }
  return offset;
}

function xScrollTop(e, bWin)
{
  var offset=0;
  if (!xDef(e) || bWin || e == document || e.tagName.toLowerCase() == 'html' || e.tagName.toLowerCase() == 'body') {
    var w = window;
    if (bWin && e) w = e;
    if(w.document.documentElement && w.document.documentElement.scrollTop) offset=w.document.documentElement.scrollTop;
    else if(w.document.body && xDef(w.document.body.scrollTop)) offset=w.document.body.scrollTop;
  }
  else {
    e = xGetElementById(e);
    if (e && xNum(e.scrollTop)) offset = e.scrollTop;
  }
  return offset;
}

function xGetComputedStyle(e, p, i)
{
  if(!(e=xGetElementById(e))) return null;
  var s, v = 'undefined', dv = document.defaultView;
  if(dv && dv.getComputedStyle){
    s = dv.getComputedStyle(e,'');
    if (s) v = s.getPropertyValue(p);
  }
  else if(e.currentStyle) {
    v = e.currentStyle[xCamelize(p)];
  }
  else return null;
  return i ? (parseInt(v) || 0) : v;
}

function xStr(s)
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])!='string') return false;}
  return true;
}

function xNum()
{
  for(var i=0; i<arguments.length; ++i){if(isNaN(arguments[i]) || typeof(arguments[i])!='number') return false;}
  return true;
}

function xDef()
{
  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
  return true;
}








/*


function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 

function shiftOpacity(id, millisec) {
    //if an element is invisible, make it visible, else make it ivisible
    if(document.getElementById(id).style.opacity == 0) {
        opacity(id, 0, 100, millisec);
    } else {
        opacity(id, 100, 0, millisec);
    }
} 

<div style="background-image: url(media/texts/photos_about/02aft.jpg); background-repeat: no-repeat; width: 200px; height: 150px;" id="blenddiv">

    <img src="media/texts/photos_about/02aft.jpg" style="width: 200px; height: 150px; border: 0 none; filter: alpha(opacity=0); -moz-opacity: 0; opacity: 0;" id="blendimage" alt="" />

</div>


 <a href="javascript:blendimage('blenddiv','blendimage', 'media/texts/photos_about/03aft.jpg',200)">Image 1</a>
 
 function blendimage(divid, imageid, imagefile, millisec) {
    var speed = Math.round(millisec / 100);
    var timer = 0;
    
    //set the current image as background
    document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
    
    //make image transparent
    changeOpac(0, imageid);
    
    //make new image
    document.getElementById(imageid).src = imagefile;

    //fade in image
    for(i = 0; i <= 100; i++) {
        setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
        timer++;
    }
}

<a href="javascript:currentOpac('digicam3', 60, 300)">fade to 60%</a>

function currentOpac(id, opacEnd, millisec) {
    //standard opacity is 100
    var currentOpac = 100;
    
    //if the element has an opacity set, get it
    if(document.getElementById(id).style.opacity < 100) {
        currentOpac = document.getElementById(id).style.opacity * 100;
    }

    //call for the function that changes the opacity
    opacity(id, currentOpac, opacEnd, millisec)
} 

<script language="JavaScript">RunSlideShow("divid","imageid","images/1.jpg;images/2.jpg;images/3.jpg;images/4.jpg;",3);</script>

functions:
//www.cryer.co.uk © 2004 and www.brainerror.net ver 1.3 © June 7,2004
//were reference for the following Javascript slide show code
function changeOpac(opacity, id)
{
var object = document.getElementById(id).style;
object.opacity = (opacity / 100);
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
object.filter = "alpha(opacity=" + opacity + ")";
}

function blendimage(divid, imageid, imagefile, millisec)
{
var speed = Math.round(millisec / 10);
var timer = 0;

//set the current image as background
document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";

//make image transparent
changeOpac(0, imageid);

//make new image
document.getElementById(imageid).src = imagefile;

//fade in image
for(i = 0; i <= 100; i++)
{
setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
timer++;
}
}

var slideCache = new Array();
function RunSlideShow(divid,imageid,imageFiles,displaySecs)
{
var imageSeparator = imageFiles.indexOf(";");
var nextImage = imageFiles.substring(0,imageSeparator);

changeOpac(0, imageid);
blendimage(divid,imageid,nextImage,100);

var futureImages= imageFiles.substring(imageSeparator+1,imageFiles.length)+ ';' + nextImage;
setTimeout("RunSlideShow('"+divid+"','"+imageid+"','"+futureImages+"',"+displaySecs+")",displaySecs*1000);

// Cache the next image to improve performance.
imageSeparator = futureImages.indexOf(";");
nextImage = futureImages.substring(0,imageSeparator);
if (slideCache[nextImage] == null)
{
slideCache[nextImage] = new Image;
slideCache[nextImage].src = nextImage;
}
}

-------

// JavaScript Document

var data = function(){
  this.process
  this.LoadXMLFile = xml_LoadXMLFile
}

function xml_LoadXMLFile(fsLocation, fsQuery, fsHandler){
	xmlhttp=null
	try{
		xmlhttp = new XMLHttpRequest();
	} catch (error) {
		try{
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (error) {
		   return false;
		}
	}
	if (xmlhttp!=null){
		xmlhttp.onreadystatechange=this.onResponse;
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	} else {
		window.status = "Your browser does not support XMLHTTP."
		return false;
	}
	return true;
}

/*  READYSTATE
    * 0 – Uninitialised
    * 1 – Loading
    * 2 – Loaded
    * 3 – Interactive
    * 4 – Completed *-/




*/



