//  You don't need to change anything in this function:

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());

}



//   The following function obtains two variables from your form (email and message) 

//   and builds a string that gets sent to your PHP script.  Change this function to

//   obtain whatever fields you want from your form.



function getquerystring() {

    //var form = document.forms['emailSub'];

   // var email = form.email.value;

    //var message = form.message.value;

    //qstr = 'email=' + escape(email) + '&message=' + escape(message); 

    qstr = '1';

    return qstr;

}



function updatepage(str){

    document.getElementById("tapContent").innerHTML = str;

}

function closeTap(id)
{
	var tap = document.getElementById(id);
	tap.style.backgroundColor="#BBBBBB";
	tap.style.fontWeight="normal";
	tap.style.color="black";
	//tap.style.borderBottom="none";
	
}

function openTap(id)
{
	var tap = document.getElementById(id);
	tap.style.backgroundColor="#FFFFFF";
	tap.style.fontWeight="800";
	tap.style.color="#C05D00";
	//tap.style.borderBottom="solid";
	//tap.style.borderBottomColor="red";
}

function loadPrints()

{

   var tapContent = document.getElementById('tapContent');
   tapContent.innerHTML= '<div align=\'center\'> <img src= \'images/ajax-loader.gif\' alt= \'Loading data, please wait...\'><\div>';
   
   openTap('printsTap');
   closeTap('motionTap');
   closeTap('webTap');
   
   javascript:xmlhttpPost('latest_prints.htm');
   
}

function loadMotion()

{

   var tapContent = document.getElementById('tapContent');
   tapContent.innerHTML= '<div align=\'center\'> <img src= \'images/ajax-loader.gif\' alt= \'Loading data, please wait...\'><\div>';
   
   openTap('motionTap');
   closeTap('printsTap');
   closeTap('webTap');
      
   javascript:xmlhttpPost('latest_motion.htm');
   

}

function loadWeb()

{

   var tapContent = document.getElementById('tapContent');
   tapContent.innerHTML= '<div align=\'center\'> <img src= \'images/ajax-loader.gif\' alt= \'Loading data, please wait...\'><\div>';
   
   openTap('webTap');
   closeTap('printsTap');
   closeTap('motionTap');
   
   javascript:xmlhttpPost('latest_web.htm');
   
}


