function preloader() {
  // counter
  var i = 0;
  // create object
  imageObj = new Image();
  // set image list
  images = new Array();
  images[0]="../images/header_and_footer_images/home_hover.jpg"
  images[1]="../images/header_and_footer_images/frida_hover.jpg"
  images[2]="../images/header_and_footer_images/saturday_hover.jpg"
  images[3]="../images/header_and_footer_images/maillist_hover.jpg"
  images[4]="../images/header_and_footer_images/pictures_hover.jpg"
  images[5]="../images/header_and_footer_images/events_hover.jpg"
  images[6]="../images/header_and_footer_images/listen_hover.jpg"
  images[7]="../images/header_and_footer_images/links_hover.jpg"
  images[8]="../images/header_and_footer_images/info_hover.jpg"
  images[9]="../images/header_and_footer_images/contact_hover.jpg"
  // start preloading
  for(i=0; i<=9; i++) {
  	imageObj.src=images[i];
  }
} 
function playflash(tag) {
	document.write(tag);
}

function checksmsform(areacode, prefix, suffix) {
	//alert (areacode.length + " " + prefix.length + " " + suffix.length);
	if (areacode.length != 3) {
		alert("Area Code must be 3 digits"); return false;
	}
	if (prefix.length != 3) {
		alert("Prefix must be 3 digits"); return false;
	}
	if (suffix.length != 4) {
		alert("Suffix must be 4 digits"); return false;
	}
	return true;
}

function autoTab(element, nextElement,alpha) {
	if (alpha == false) {
		var re = /^[0-9]*$/;
		if (!re.test(element.value)) {
			element.value = element.value.replace(/[^0-9]/g, "");
		}
	}
	if (element.value.length == element.maxLength && nextElement != null) {
		element.form.elements[nextElement].focus();
	}
}

function printwindow(url) {
	var myWindow;
	var width = 630;
    var height = 792;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + 
        ",status,scrollbars=1,resizable,left=" + left + ",top=" + top + 
        "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, 'Lizard_Lounge_Print', windowFeatures);
}

function popImage(imageURL,imageTitle) {
	//really not important (the first two should be small for Opera's sake)
	PositionX = 5;
	PositionY = 5;
	defaultWidth  = 200;
	defaultHeight = 200;
	//kinda important
	var AutoClose = true;
	var imgWin = window.open(imageURL,'_blank','scrollbars=yes,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
  	if( !imgWin ) { return true; } //popup blockers should not cause errors
  	imgWin.document.write('<html>\n'+
  	'<head>\n'+
	'	<title>'+imageTitle+'<\/title>\n'+
	'	<style type="text\/css">\n'+
	'		#images{visibility: hidden;}\n'+
	'	<\/style>\n'+
	'	<script language="javascript">\n'+
	'		function showImages(divId){\n'+
	'   		document.getElementById(divId).style.visibility = "visible";\n'+
	'		}\n'+
	'	<\/script>\n'+
	'	<script type="text\/javascript">\n'+
    '		function resizeWinTo() {\n'+
    '			if( !document.images.length ) { \n'+
	'				document.images[0] = document.layers[0].images[0]; \n'+
	'			} \n'+
    '			var oH = document.images[0].height; \n'+
	'			var oW = document.images[0].width; \n'+
    '			if( !oH || window.doneAlready ) { \n'+ //in case images are disabled
	'				return; \n'+
	'			}\n'+ 
    '			window.doneAlready = true;\n'+ //for Safari and Opera
    '			var x = window; \n'+
	'			x.resizeTo( oW + 200, oH + 200 );\n'+
    '			var myW = 0;\n'+
	'			var myH = 0;\n'+
	'			var d = x.document.documentElement;\n'+
	'			var b = x.document.body;\n'+
    '			if( x.innerWidth ) { \n'+
	'				myW = x.innerWidth; \n'+
	'				myH = x.innerHeight; \n'+
	'			} else if( d && d.clientWidth ) { \n'+
	'				myW = d.clientWidth; \n'+
	'				myH = d.clientHeight; \n'+
	'			} else if( b && b.clientWidth ) { \n'+
	'				myW = b.clientWidth; \n'+
	'				myH = b.clientHeight; \n'+
	'			}\n'+
    '			if( window.opera && !document.childNodes ) { \n'+
	'				myW += 16; \n'+
	'			}\n'+
    '			x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\n'+
    '			var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
    '			var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
    '			if( !window.opera ) { \n'+
	'				x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); \n'+
	'			}\n'+
    '		}\n'+
    '	<\/script>\n'+
    '<\/head>\n'+
	'<body bgcolor="#171717" onload="resizeWinTo();"'+(AutoClose?'':'')+'>'+
    (document.layers?('<layer left="0" top="0">'):('\n'+
	'	<div style="position:absolute;left:0px;top:0px;display:table;background: white url(images/body_area_images/loadingimage.gif) no-repeat scroll top left;">\n'))+
	'		<div id="images">'+
	'			<img src="'+imageURL+'" alt="Loading image ..." title="" onload="showImages(\'images\');resizeWinTo();">'+
	'		<\/div>\n'+
    (document.layers?'<\/layer>':'	<\/div>\n')+'<\/body>\n<\/html>');
  imgWin.document.close();
  imgWin.focus();
}

function Lizard_Lounge_Player() {
	var oW = 500;
	var oH = 254;
PlayerCode=('\074ob\152ect \143\154\141\163\163i\144\075\042c\154\163\151\144:\144\062\067cdb6\145\055a\145\066\144-\061\061\143f-\071\066\142\070\05544\0645\065\063\06540\060\0600\042\040c\157\144\145\142a\163e=\042\150\164\164\160:\057\057fp\144\157\167\156l\157\141\144\056\155a\143ro\155\145\144\151\141.\143\157\155/p\165\142\057\163\150oc\153\167\141\166e\057\143ab\163\057\146\154a\163\150/\163\167\146l\141\163h.\143\141\142\043v\145r\163\151on=\066\054\060,\064\067\0540\042\040w\151\144th\075\042\0648\060\042 \150\145i\147\150\164\075\04214\060"\040id\075"\167\151\155\160\171"\040alig\156\075\042\143e\156te\162"\076\074\160a\162\141m\040\156a\155\145\075\042a\154\154\157\167S\143\162\151\160\164A\143\143\145\163\163"\040\166\141\154u\145\075\042s\141\155\145D\157ma\151\156\042\040/\076\074\160a\162\141\155 n\141\155\145\075\042m\157\166\151\145"\040\166\141lue\075\042\150\164\164p:\057/ww\167\056t\150\145\154\151\172a\162\144l\157\165ng\145\056c\157\155\057\155\165s\151\143\057\167im\160\171\056\163w\146\077\167\151mp\171\101\160p\075\150t\164\160\072\057\057w\167\167\056\164\150e\154\151\172a\162\144\154o\165\156\147\145\056co\155\057\155\165s\151\143\057\147en\145rat\145dp\154a\171\154i\163t\056\170\155\154\046d\145\146a\165\154\164\126i\163\165a\154\105\170\164=\152p\147\046t\150\145V\157\154u\155e\0751\060\060\046\142u\146\146\145\162\101u\144\151\157\0750\046\151\156f\157\104\151\163\160l\141\171Ti\155\145\075\063&\163\143\162ol\154\111\156f\157\104\151s\160\154a\171\075\171e\163\046\163t\141\162\164\120l\141\171\151\156gO\156loa\144\075\171\145s\046\163\164\141\162t\117\156\124r\141\143k=1&\141\165\164\157A\144\166a\156c\145\075y\145\163&po\160U\160\110\145l\160=y\145s\046\163e\162\166\145\115P\063\075\171\145\163"\040\057\076<\160a\162\141\155 \156\141\155e=\042\154\157\157p" \166\141\154\165\145=\042\146\141\154se\042\040/\076<\160\141\162\141m\040nam\145\075\042\155e\156\165"\040\166\141l\165\145\075\042\146a\154\163\145"\040\057\076<\160\141\162a\155\040\156\141\155e=\042\161\165\141\154i\164y\042\040\166\141\154u\145\075\042\150\151g\150" \057\076\074\160\141\162\141m\040n\141m\145\075\042\142\147c\157\154\157r\042 \166\141\154\165e\075\042\0430\060\060\060\060\060" \057\076\074e\155\142\145d\040\163r\143\075\042\150\164t\160\072\057\057ww\167\056t\150\145liz\141\162d\154\157\165\156ge\056\143\157m\057\155\165s\151c\057\167i\155\160\171.\163\167\146?\167\151\155\160yA\160\160\075ht\164\160:\057\057\167w\167\056\164h\145\154\151\172\141r\144\154o\165n\147\145\056\143o\155\057m\165s\151c\057\147\145\156\145r\141ted\160\154\141\171l\151\163\164\056x\155l\046\144\145\146\141ult\126\151\163\165\141l\105\170\164\075j\160\147\046\164h\145V\157l\165me=\061\0600\046\142\165\146fer\101\165d\151\157\075\060\046i\156\146\157\104\151s\160\154\141\171\124im\145\075\063\046s\143\162o\154\154\111nf\157\104i\163\160\154\141\171=\171e\163\046\163t\141\162\164\120la\171\151\156\147\117n\154\157\141\144=ye\163\046\163ta\162\164\117\156Tr\141ck=\061\046a\165\164\157A\144\166\141\156\143e\075\171\145s\046\160\157\160U\160\110e\154\160\075y\145\163\046s\145r\166\145\115\120\063=\171\145s\042\040\154\157o\160\075"\146\141ls\145\042 \155\145\156\165\075"\146\141\154\163\145"\040q\165\141\154\151\164y\075\042\150\151gh"\040\167\151\144t\150\075\042\0648\060"\040\150\145i\147\150\164\075"\061\064\060"\040\156\141\155e="\167\151m\160\171\042\040\141l\151\147\156\075\042ce\156t\145\162"\040\142\147\143\157l\157\162\075\042#\0600\0600\060\060\042 \141\154\154\157\167S\143\162\151\160\164A\143\143\145\163\163=\042s\141\155\145\104o\155\141\151\156"\040\164\171p\145\075\042\141p\160\154\151c\141\164\151\157n/\170-\163\150o\143kw\141ve\055\146\154\141s\150" \160l\165gi\156\163p\141\147\145\075"\150\164\164p\072\057/\167\167w\056\155\141\143\162o\155\145\144\151\141.c\157\155\057\147\157/\147\145\164\146\154ash\160\154\141y\145\162\042\040\057>\074\057\157b\152\145c\164\076');
	var dochtml = "";
dochtml += '<html>';
dochtml += '	<head>';
dochtml += '		<title>Lizard Lounge Player</title>';
dochtml += '		<meta http-equiv="Pragma" content="no-cache" />';
dochtml += '		<meta http-equiv="Expires" content="-1" />';
dochtml += '	</head>';
dochtml += '    <style type="text\/css">';
dochtml += '		#pageContainer {';
dochtml += '			background-image:url(http://www.thelizardlounge.com/images/music_page_images/background.jpg);';
dochtml += '			background-position:center;';
dochtml += '			background-position:top;';
dochtml += '			background-repeat:no-repeat;';
dochtml += '			width:500px;';
dochtml += '			height:254px;';
dochtml += '		}';
dochtml += '	</style>';
dochtml += '	<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#000000">';
dochtml += '		<div id="pageContainer" name="pageContainer">';
dochtml += '			<table align="center" style="margin-top:80px;">';
dochtml += '				<tr>';
dochtml += '					<td algin="center">';
dochtml += '						' + PlayerCode;
dochtml += '					</td>';
dochtml += '				</tr>';
dochtml += '			</table>';
dochtml += '		</div>';
dochtml += '	</body>';
dochtml += '</html>';
	var x = window.open('','LizardLoungePlayer','width=254,height=500,resizable=1');
	if( !x ) { 
		return true;
	}
	x.document.open();  
	x.document.write(dochtml);
	x.document.close();
	if( !oH ) { 
		return false; 
	}
	x.resizeTo( oW, oH + 200 );
	var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;
	if( x.innerWidth ) { 
		myW = x.innerWidth; myH = x.innerHeight; 
	} else if( d && d.clientWidth ) { 
		myW = d.clientWidth; myH = d.clientHeight; 
	} else if( b && b.clientWidth ) { 
		myW = b.clientWidth; myH = b.clientHeight; 
	}
	if( window.opera && !document.childNodes ) { 
		myW += 16; 
	}
	x.resizeTo( oW = oW + (oW - myW ), oH = oH + ( (oH + 200 ) - myH ) );
	var scW = screen.availWidth ? screen.availWidth : screen.width;
	var scH = screen.availHeight ? screen.availHeight : screen.height;
	x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2));
	if( x.focus ) { 
		x.focus(); 
	}
	return false;
}