/* Standard Include for Rollover sites */
/* (c)2007, Red Beagle Web Development, All Rights Reserved */
imageType="gif";
blinkMe=new Array("#ca8a7e", "#333333", "#ca8a7e", "#333333", "#ca8a7e", "#333333");
imagesPath="./images/"

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

function newImage(arg) { 
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
		
function preloadButtons(c) {
	if(preloadButtons.arguments.length==2) adder=preloadButtons.arguments[1];
	else adder=0;
	for (i=1; i<(c+1); i++) {
		imgz=newImage(imagesPath+"/button_"+(adder+i)+"_over."+imageType);
	}
}

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('./music/'+mypage, 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

function flashDetectPlugin() {
	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>');
}

// ************************
// flash_detect(yesFlash, noFlash)
//
// If the agent has flash, then write the content of yesFlash
// If not, or if ?flash=no, write the content of noFlash
// ************************
function flash_detect(yesFlash, noFlash, passMe) {
	if (document.URL.split('?')[1]=='flash=no') { dett=false; }
	else {
		if (navigator.plugins && navigator.plugins.length>0) { dett=flashDetectPlugin(); }
		else {
			if(detectableWithVB) { dett = detectActiveXControl('ShockwaveFlash.ShockwaveFlash.1'); }
		}
	}
	if (dett) { document.write(yesFlash.replace(/flashpass/gi, passMe)) } else { document.write(noFlash); }
}

// -- END OF FLASH DETECTION CODE

subAd="&#119;&#98;&#98;&#108;ue";
clientAddress='<a href="m&#97;'+'&#105;&#108;to:';

function writeMA(n)
{
document.write(clientAddress+n+'&#64;'+subAd+'s&#46;&#99;om">'+n+'&#64;'+subAd+'s&#46;&#99;om</a>');
}
