imageType="gif";

function hilight(index, state) {
	var obj=document.getElementById("butt"+index);
	obj.src="./images/button_"+index+(state==1?"_over":"")+"."+imageType;
}

function newImage(arg) { 
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
		
function preloadButtons(c) {
	for (i=1; i<(c+1); i++) {
		imgz=newImage("./images/button_"+i+"_over."+imageType);
	}
}

blinkMe=new Array("#ca8a7e", "#333333", "#ca8a7e", "#333333", "#ca8a7e", "#333333");
function blinkText(f, i) {
	obj=document.getElementById(f);
	obj.style.color=blinkMe[i++];
	if (i<blinkMe.length) setTimeout("blinkText('"+f+"', "+i+")", 500);
}

function rossNewWindow(mypage, myname, title, w, h, scroll)
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = "height="+h+",width="+w+",top="+wint+",left="+winl+",scrollbars="+scroll
	win = window.open('./image_ref.php?i='+mypage+'&t='+title, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

// This is the sundial friendly gizmo
function NewWindow(mypage, myname, w, h, scroll)
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = "height="+h+",width="+w+",top="+wint+",left="+winl+",scrollbars="+scroll
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}

// -- This section of code is to detect a flash plugin. Use VB script for MSIE Windows
// After all is said and done, call flashDetect=true to know what to do

function flashDetectPlugin() {
	if (document.URL.split('?')[1]=='flash=no') return false;
	for (i=0; i<navigator.plugins.length; i++)
		if (navigator.plugins[i].description.indexOf("Flash")>=0 && navigator.plugins[i].description.indexOf("Shockwave")>=0) return true;
	return false;
}

if ((navigator.userAgent.indexOf('MSIE') != -1) && (navigator.userAgent.indexOf('Win') != -1)) {
    document.writeln('<script language="VBscript">');

    document.writeln('detectableWithVB = False');
    document.writeln('If ScriptEngineMajorVersion >= 2 then');
    document.writeln('  detectableWithVB = True');
    document.writeln('End If');

    document.writeln('Function detectActiveXControl(activeXControlName)');
    document.writeln('  on error resume next');
    document.writeln('  detectActiveXControl = False');
    document.writeln('  If detectableWithVB Then');
    document.writeln('     detectActiveXControl = IsObject(CreateObject(activeXControlName))');
    document.writeln('  End If');
    document.writeln('End Function');
    document.writeln('</scr' + 'ipt>');
}

function flashDetect() {
	if (navigator.plugins && navigator.plugins.length>0) { dett=flashDetectPlugin(); } else {
		if(detectableWithVB) { dett = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1'); }
	}
	return dett;
}

// -- END OF FLASH DETECTION CODE

function flashPinwheel() {
	if (flashDetect()) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="550" height="280" id="flash" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="flash.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="flash.swf" quality="high" bgcolor="#ffffff" width="550" height="280" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />	</object>');
	} else {
		document.write('<img src="./images/550_stock_familycar.jpg" alt=" " />');
	}
}
// -->
