/*
FLASH DETECTOR
Nick Nettleton; parts adapted from Dreamweaver.
*/

var FlashMode;

//nn flash object
function FlashObject(){
	this.html='';
	this.althtml='';
	this.display=function(){
		if(FlashMode==null) FlashMode=checkFlash();
		if(FlashMode) document.write(this.html);
		else document.write(this.althtml);
		}
	}

with (navigator) if (appName.indexOf('Microsoft')!=-1 && appVersion.indexOf('Mac')==-1) document.write(''+
'<scr'+'ipt language="VBScript">\nOn error resume next\n'+
'MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\n'+
'MM_flash = NOT IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</scr'+'ipt>');

function checkFlash() { //v4.0
	var plgIn='Shockwave Flash';
	var ok=false; document.MM_returnValue = false;
	with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
		ok=(plugins && plugins[plgIn]);
		} else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
			if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
			else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
			else ok=autoGo;
		}
	return ok;
  	}

//end Flash detector;
var dom = (document.getElementById) ? 1:0 ;

function autoRolls(){
	if( !dom ) {return false ;}
	var els = document.images ;
	for( var i = 0 ; i < els.length ; i++ ){
		var img = els[i] ;
		var oversrc ;
		if( oversrc = img.getAttribute( "oversrc" ) ){
			var imageSelected=img.getAttribute("selected");
			if( imageSelected ){
				img.src = oversrc ;
			} else {
				img.oversrc = oversrc ;
				img.outsrc = img.src ;
				img.selected = img.getAttribute( "selected" ) ;
				img.onmouseout = function(){ this.src = this.outsrc; } ;
				img.onmouseover = function(){ this.src = this.oversrc } ;
				img.onclick = function(){
					this.onmouseover = null ;
					this.onmouseout = null ;
					this.src = this.oversrc ;
				} // onclick
			img.preloader = new Image() ;
			img.preloader.src = img.oversrc ;	
			} // if...else
		} // if
	} // for
} // autoRolls
