

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(fsPath, fsW, fsH, fsSkin){

	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="' + fsW + '" height="' + fsH + '" 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=' + fsSkin + '&streamName=' + fsPath + '&autoPlay=true&autoRewind=true" /><embed src="/_lib/flash/flvplayer_progressive.swf" flashvars="&MM_ComponentVersion=1&skinAutoHide=true&skinName=' + fsSkin + '&streamName=' + fsPath + '&autoPlay=true&autoRewind=true" quality="high" scale="noscale" width="' + fsW + '" height="' + fsH + '" 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 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 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 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 *-/




*/
