// JavaScript Document
 
// Navigation elements
homebutton = new Image();
homebutton_ro = new Image();
classbutton = new Image();
classbutton_ro = new Image();
regbutton = new Image();
regbutton_ro = new Image();
contactbutton = new Image();
contactbutton_ro = new Image();
aboutbutton = new Image();
aboutbutton_ro = new Image();
aboutmbutton = new Image();
aboutmbutton_ro = new Image();
linksbutton = new Image();
linksbutton_ro = new Image();
friendbutton = new Image();
friendbutton_ro = new Image();
gallerybutton = new Image();
gallerybutton_ro = new Image();
circlespacer = new Image();
circlespacer_ro = new Image();
circlespacer_l2 = new Image();
circlespacer_l2_ro = new Image();

homebutton.src="images/nav/home.jpg";
homebutton_ro.src="images/nav/home_ro.jpg";
classbutton.src="images/nav/class.jpg";
classbutton_ro.src="images/nav/class_ro.jpg";
regbutton.src="images/nav/registration.jpg";
regbutton_ro.src="images/nav/registration_ro.jpg";
contactbutton.src="images/nav/contact.jpg";
contactbutton_ro.src="images/nav/contact_ro.jpg";
aboutbutton.src="images/nav/about.jpg";
aboutbutton_ro.src="images/nav/about_ro.jpg";
aboutmbutton.src = "images/nav/about_milana.jpg";
aboutmbutton_ro.src = "images/nav/about_milana_ro.jpg";
linksbutton.src="images/nav/links.jpg";
linksbutton_ro.src="images/nav/links_ro.jpg";
friendbutton.src="images/nav/friends_of_jamilah.jpg";
friendbutton_ro.src="images/nav/friends_of_jamilah_ro.jpg";
gallerybutton.src="images/nav/gallery.jpg";
gallerybutton_ro.src="images/nav/gallery_ro.jpg";
circlespacer.src="images/nav/circlespacer.jpg";
circlespacer_ro.src="images/nav/circlespacer_ro.jpg";
circlespacer_l2.src="images/nav/circlespacer_l2.jpg";
circlespacer_l2_ro.src="images/nav/circlespacer_l2_ro.jpg";
	
var rowbg = '';
var rowbgsel = '#051f2d';

function hlRow(id, flag) {
		if (flag==1) { id.style.backgroundColor = rowbgsel; }
		else { id.style.backgroundColor = rowbg; }
}
function toReg() {
		window.location='index.php?page=reg';
}
function get_image(id)
{  
  var xmlHttp = get_xmlHttp();
	xmlHttp.onreadystatechange=function() {
      if(xmlHttp.readyState==4) {
		document.getElementById("largeimage").innerHTML=xmlHttp.responseText;
      }
    }
	controlstr = "limage.php?id="+id;
    xmlHttp.open("GET",controlstr,true);
    xmlHttp.send(null);
}

// This function will return a XMLHttp connection
function get_xmlHttp () {
  var xmlHttp;
  try { // Firefox, Opera 8.0+, Safari   
		xmlHttp=new XMLHttpRequest(); }
  catch (e) { // Internet Explorer    
	try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }
    catch (e) {
		try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
    catch (e) { 
		alert("Your browser does not support AJAX!");
		return false;  
	}}}
	return xmlHttp;
}