function preload(){	if (document.images) {
		// Preload active images        music_on = new Image();              music_on.src = "images/nav_music_over.gif";	    music_off = new Image();         music_off.src = "images/nav_music.gif";        shows_on = new Image();              shows_on.src = "images/nav_shows_over.gif";	    shows_off = new Image();         shows_off.src = "images/nav_shows.gif";        news_on = new Image();              news_on.src = "images/nav_news_over.gif";	    news_off = new Image();         news_off.src = "images/nav_news.gif";        bio_on = new Image();              bio_on.src = "images/nav_bio_over.gif";	    bio_off = new Image();         bio_off.src = "images/nav_bio.gif";        photos_on = new Image();              photos_on.src = "images/nav_photos_over.gif";	    photos_off = new Image();         photos_off.src = "images/nav_photos.gif";        projects_on = new Image();              projects_on.src = "images/nav_projects_over.gif";	    projects_off = new Image();         projects_off.src = "images/nav_projects.gif";        blog_on = new Image();              blog_on.src = "images/nav_blog_over.gif";	    blog_off = new Image();         blog_off.src = "images/nav_blog.gif";        contact_on = new Image();              contact_on.src = "images/nav_contact_over.gif";	    contact_off = new Image();         contact_off.src = "images/nav_contact.gif";	}}

// Function to 'activate' images.function imgOn(imgName) {	if (document.images) {    	document[imgName].src = eval(imgName + "_on.src");	}}// Function to 'deactivate' images.function imgOff(imgName) {	if (document.images) {    	document[imgName].src = eval(imgName + "_off.src");	}}






// AJAX for getting photolist

function fetchList(dest) { 

	try { 

	// Moz supports XMLHttpRequest. IE uses ActiveX.  
	// browser detction is bad. object detection works for any browser  
	xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); 

	} catch (e) { 
	// browser doesn't support ajax. handle however you want  
	} 

	// the xmlhttp object triggers an event everytime the status changes  
	// triggered() function handles the events  
	xmlhttp.onreadystatechange = processList; 

	// open takes in the HTTP method and url.  
	xmlhttp.open("GET", dest); 

	// send the request. if this is a POST request we would have  
	// sent post variables: send("name=aleem&gender=male)  
	// Moz is fine with just send(); but  
	// IE expects a value here, hence we do send(null);  
	xmlhttp.send(null); 
} 

function processList() { 
	// if the readyState code is 4 (Completed)  
	// and http status is 200 (OK) we go ahead and get the responseText  
	// other readyState codes:  
	// 0=Uninitialised 1=Loading 2=Loaded 3=Interactive 
	if (xmlhttp.readyState == 1) {
		// this will show whatever during loading process
		document.getElementById("photo_list").innerHTML = "<div style=\"background-color:#99CCFF;color:#FFFFFF;padding:3px;\">Loading...</div>";
	} 
	if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { 
		// xmlhttp.responseText object contains the response.  
		//				document.getElementById("output").innerHTML = xmlhttp.responseText;
		//window.setTimeout("document.getElementById(\"output\").innerHTML = \"<p>Thank You For Signing Up!</p>\"",2000);
		//window.setTimeout("document.getElementById(\"output\").innerHTML = xmlhttp.responseText",2000);
		document.getElementById("photo_list").innerHTML = xmlhttp.responseText;
	}
} 






// AJAX for mailing list signup

function loadurl(dest,email) { 

	linkToProcess = dest+"&reqemail="+email;

	try { 

	// Moz supports XMLHttpRequest. IE uses ActiveX.  
	// browser detction is bad. object detection works for any browser  
	xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); 

	} catch (e) { 
	// browser doesn't support ajax. handle however you want  
	} 

	// the xmlhttp object triggers an event everytime the status changes  
	// triggered() function handles the events  
	xmlhttp.onreadystatechange = triggered; 

	// open takes in the HTTP method and url.  
	xmlhttp.open("GET", linkToProcess); 

	// send the request. if this is a POST request we would have  
	// sent post variables: send("name=aleem&gender=male)  
	// Moz is fine with just send(); but  
	// IE expects a value here, hence we do send(null);  
	xmlhttp.send(null); 
} 

function triggered() { 
	// if the readyState code is 4 (Completed)  
	// and http status is 200 (OK) we go ahead and get the responseText  
	// other readyState codes:  
	// 0=Uninitialised 1=Loading 2=Loaded 3=Interactive 
	if (xmlhttp.readyState == 1) {
		// this will show whatever during loading process
		document.getElementById("output").innerHTML = "<div style=\"background-color:#99CCFF;color:#FFFFFF;padding:3px;\">Saving...</div>";
	} 
	if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { 
		// xmlhttp.responseText object contains the response.  
		//				document.getElementById("output").innerHTML = xmlhttp.responseText;
		//window.setTimeout("document.getElementById(\"output\").innerHTML = \"<p>Thank You For Signing Up!</p>\"",2000);
		window.setTimeout("document.getElementById(\"output\").innerHTML = xmlhttp.responseText",2000);
	}
} 




function echeck(str) {

	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   alert("Invalid E-mail ID")
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	    alert("Invalid E-mail ID")
	    return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
	    alert("Invalid E-mail ID")
	    return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
	    alert("Invalid E-mail ID")
	    return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
	    alert("Invalid E-mail ID")
	    return false
	 }
	
	 if (str.indexOf(" ")!=-1){
	    alert("Invalid E-mail ID")
	    return false
	 }

		 return true					
}


function displayImage(v,w,x,y,z) {
	var imageCode = "<img src=\"images/" + v + "\" width=\"" + w + "\" height=\"" + x + "\" alt=\"" + y + "\" title=\"" + y + "\"><br><span class=\"caption\">" + z + "</span>";
	parent.document.getElementById("gphoto").innerHTML = imageCode;
}







