
var UseFlash = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ) {
	// Check for Flash version 3 or greater in Netscape
	var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1))>=3)
		UseFlash = 1;
} else if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	// Assume any Windows IE except for Windows 3.1 supports the OBJECT tag
	UseFlash = 1;
}

if((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.indexOf("Mac") != -1)) { UseFlash = 0; }

if ( UseFlash == 1 ) {
	// Use Flash player
	theHTML='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="580" HEIGHT="100" id="indieburn" ALIGN="">';
	theHTML=theHTML+'<PARAM NAME=movie VALUE="indieburn_home.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#FFFFFF> ';
	theHTML=theHTML+'<EMBED src="indieburn_home.swf" loop=false menu=false quality=best bgcolor=#FFFFFF ';
	theHTML=theHTML+' swLiveConnect=FALSE WIDTH=580 HEIGHT=100';
	theHTML=theHTML+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
	theHTML=theHTML+'</EMBED>';
	theHTML=theHTML+'</OBJECT>';
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)) {
	// Netscape 2 will display the IMG tag below so don't write an extra one
	theHTML='<IMG SRC="images/img_flash_fpo.jpg" WIDTH=580 HEIGHT=100 BORDER=0>';
} else {
	theHTML='<IMG SRC="images/img_flash_fpo.jpg" WIDTH=580 HEIGHT=100 BORDER=0>';
}
//theHTML='<IMG SRC="images/img_flash_fpo.jpg" WIDTH=580 HEIGHT=100 BORDER=0>';
////////// end Flash code



function isPosInt(val) {
	str = val.toString();
	for(i=0;i<str.length;i++) {
		oneChar = str.charAt(i);
		if(oneChar < "0" || oneChar > "9") {
			return false;
		}
	}
	return true;
}


/// BEGIN NAV ROLLOVERS

if (document.images) {
	rollOvers = 1;
} else {
    rollOvers = 0;
}
        
if (rollOvers)
{
nav_contactus_ON = new Image(159,29);
nav_contactus_ON.src = "images/nav_contactus_on.gif";
nav_contactus_OFF = new Image(159,29);
nav_contactus_OFF.src = "images/nav_contactus_off.gif";

nav_events_ON = new Image(159,29);
nav_events_ON.src = "images/nav_events_on.gif";
nav_events_OFF = new Image(159,29);
nav_events_OFF.src = "images/nav_events_off.gif";

nav_guestbook_ON = new Image(159,29);
nav_guestbook_ON.src = "images/nav_guestbook_on.gif";
nav_guestbook_OFF = new Image(159,29);
nav_guestbook_OFF.src = "images/nav_guestbook_off.gif";

nav_home_ON = new Image(159,29);
nav_home_ON.src = "images/nav_home_on.gif";
nav_home_OFF = new Image(159,29);
nav_home_OFF.src = "images/nav_home_off.gif";

nav_registration_ON = new Image(159,29);
nav_registration_ON.src = "images/nav_registration_on.gif";
nav_registration_OFF = new Image(159,29);
nav_registration_OFF.src = "images/nav_registration_off.gif";

}


function imgOn( imgName ) {
	if ( rollOvers ) {
		document[imgName].src = eval( "nav_" + imgName + "_ON.src" );
	}
}

function imgOff( imgName ) {
	if ( rollOvers ) {
		document[imgName].src = eval( "nav_" + imgName + "_OFF.src" );
	}
}

/// END NAV ROLLOVERS



// select and unselect a group of checkboxes
function check_all(form,name) {
	var numBoxes = form.numRows.value;
	for (i=1; i<=numBoxes; i++) {
		form[name+"_"+i].checked = true; 
	}
	//form.eval[name].value="all"; 
}

function uncheck_all(form,name) {
	var numBoxes = form.numRows.value;
	for (i=1; i<=numBoxes; i++) {
		form[name+"_"+i].checked = false; 
	}
	//form.servePages.value=""; 
}



function makeWin(URL,w,h,sc,rs) {

	var top = parseInt(screen.availWidth/2)-parseInt(h*2);
	var left = parseInt(screen.availWidth/2)-parseInt(w/2);

	newWin=window.open(URL, "newWin", "width="+w+",height="+h+",top="+top+",left="+left+",status=1,toolbar=0,menubar=0,scrollbars="+sc+",resizable="+rs);
		if (!newWin.opener) {
			newWin.opener = window;
		}
	newWin.focus();
	
	// centers the window
	//moveX = parseInt(screen.availWidth/2)-parseInt(w/2);
	//moveY = parseInt(screen.availHeight/2)-h;
	//newWin.moveTo(0,0);
}




function showStatus(msg) {
	window.status = msg;
	return true;
}

function isblank(s){
	for(var i = 0; i < s.length; i++){
		var c = s.charAt(i);
		if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
	}
return true;
}

function isEmpty(input) {
	if (input == "" || input == null) {
		return true
	}
	return false
}

function select(field) {
	field.focus()
	field.select()
}

function checkNums(value) {
	var chars = "0123456789.-()";
	for (i=0; i < value.length; i++) {
		c = value.charAt(i).toLowerCase();
		if(chars.indexOf(c) == -1) {
			return true;
			break;
		}
	}
}

// jump menu
function jump_to(selectObj) {
	url = selectObj.options[selectObj.selectedIndex].value;
	if(url) self.location = url;
	
}


// anti email-harvesting script
function noSpam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}


// validate email for newsletter subscribe
function checkEmail(field) { 
	if (isEmpty(field.value)) {
		alert("Please enter your email address.");
		field.focus();
		field.select();
		return false
	}
	if ((field.value.indexOf("@") == -1) || (field.value.indexOf(".") == -1)) {
	 	field.focus();
		field.select();
		alert("Please enter a valid email address.");
		return false;
	}

}


// validate login fields
function checkLogin(form) { 
	/*if (isEmpty(field.value)) {
		alert("Please enter your email address.");
		field.focus();
		field.select();
		return false
	}
	if ((field.value.indexOf("@") == -1) || (field.value.indexOf(".") == -1)) {
	 	field.focus();
		field.select();
		alert("Please enter a valid email address.");
		return false;
	}*/
	
	return true;

}

// highlight subscribe field
function toggleSub(field,status) { 
	field.style.backgroundColor = (status=='on')? '#eeeeff':'#ddddff';
}


function makeSure() { 
	if (confirm("Please remember that deleting is irreversible!!!\nAre you SURE you wish to proceed?")) {
		return true; } else { return false; }
}

