// JavaScript Document
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
MM_preloadImages('images/nav_home_on.jpg', 'images/nav_bios_on.jpg', 'images/nav_music_on.jpg', 'images/nav_news_on.jpg', 'images/nav_contact_on.jpg', 'images/nav_bphotos_on.jpg');

/* Pop-up definition*/
var newWin = null;
function popUp(strURL, strType) {  
 if (newWin != null && !newWin.closed)    
  newWin.close();  
 var strOptions="";  
 if (strType=="lyrics")
  strOptions="height=500,width=400,scrollbars,menubar,resizable"; 
 newWin = window.open(strURL, 'newWin', strOptions);  
 newWin.focus();
}

function xmlhttpPost(strURL) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystring());
}

function getquerystring() {
    var form     = document.forms['f1'];
    var em = form.subemail.value;
    qstr = 'em=' + escape(em);  // NOTE: no '?' before querystring
    return qstr;
}

function updatepage(str){
 	if (document.getElementById("HPSubscribe")) {
		document.getElementById("HPSubscribe").innerHTML = str;
	} else if (document.getElementById("SubSubscribe")) {
		document.getElementById("SubSubscribe").innerHTML = str;
	}
}


function doform() {
	xmlhttpPost("./email_subscribe.php")
}
function doformsub() {
	xmlhttpPost("./email_subscribe_sub.php")
}
function doformsubu() {
	xmlhttpPost("./email_subscribe_subu.php")
}

 function popUpVideo(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=480,height=360');");
}

//-->
