document.getElementById('stylesheet').href = "styles.css";


function pause(milliseconds) {
	var dt = new Date();
	while ((new Date()) - dt <= milliseconds) { /* Do nothing */ }
}

function loadXMLDoc(url,title)
{
if (window.XMLHttpRequest)
  {
  xmlhttp = new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.open("GET",url,false);
xmlhttp.send(null);

document.getElementById('page').innerHTML=xmlhttp.responseText;
addon = "Mack CMS | ";
newtitle = addon + title;
document.title = newtitle;
}



$(document).ready(function(){
	if (location.hash == "#About" || location.hash == "#Contact" || location.hash == "#availability" || location.hash == "#portfolio" || location.hash == "#Home" || location.has == "#Test" || location.hash == "#Links" || location.hash == "#Free" || location.hash == "#Videos" || location.hash == "#Newsletter" )
		loadXMLDoc(location.hash.substring(1),location.hash.substring(1));
	$('#output').fadeOut(0);

   $('#contactform').ajaxForm({ 
       // target identifies the element(s) to update with the server response 
       target: '#output', 
	   //beforeSubmit: showPending,
       // success identifies the function to invoke when the server response 
       // has been received; here we apply a fade-in effect to the new content 
       success: function() { 
           $('#output').fadeIn('slow');
       }
       
   }); 
	
function s(formData, jqForm, options) { 
    // formData is an array; here we use $.param to convert it to a string to display it 
    // but the form plugin does this for you automatically when it submits the data 
    var queryString = $.param(formData); 
 
    // jqForm is a jQuery object encapsulating the form element.  To access the 
    // DOM element for the form do this: 
     var formElement = jqForm[0]; 
 
    alert('Sending Message...'); 
 
    // here we could return false to prevent the form from being submitted; 
    // returning anything other than false will allow the form submit to continue 
    return true; 
} 

});



