//form highlighting
hlight = {

	on: function(a){
	  a.style.background = '#F0F593';
	},
	
	off: function(a){
	  a.style.background = '#F9FBD3';
	}	

}

//ajax
function aj(a)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
  
  

xmlhttp.onreadystatechange=function()
{

if(xmlhttp.readyState==1)
  {
	//$("#ajaxContent").css('display', 'none');
	document.getElementById('content').innerHTML='<div><img src="images/loading.gif" alt="loading" /></div>';
  }

   

if(xmlhttp.readyState==4)
  {

  //$("#ajaxContent").slideDown("normal");
//document.getElementById("content").innerHTML=xmlhttp.responseText;
//document.body.innerHTML = xmlhttp.responseText;
//document.location = a;

  }
 
}
xmlhttp.open("GET",a,true);
xmlhttp.send(null);

//document.getElementById('active').id = 'inactive';
//link.id = "active";

return false;

}

function preload(a){

thediv = document.getElementById('content');

thediv.innerHTML='<div style="margin:70px 250px;"><img src="images/loading3.gif" alt="loading" /></div>';

var loading = setTimeout(function(){go_to(a)}, 500);

return false;
}


function go_to(newloc){
  window.location.href = newloc;
}

$("document").ready(function(){
  
//hover buttons
  $('button, a.editlink, a.button, a.lui-button').hover(
	function(){ 
		$(this).addClass("ui-state-hover"); 
	},
	function(){ 
		$(this).removeClass("ui-state-hover"); 
	}
  );
  
});

//COOKIES
//Syntax: setCookie(cookieName, cookieValue[, expire[, path[, domain[, isSecure]]]] )
//http://www.hscripts.com/tutorials/javascript/cookie-parameters.php
//example usage - setCookie('name', 'value', 365);
function setCookie(c_name,value,expiredays)
{

var exdate=new Date();//assigns the current date to the variable exDate
exdate.setDate(exdate.getDate()+expiredays);//sets the expiry date
document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());//sets the cookie
} 

//form highlighting
hlight = {

	on: function(a){
	  a.style.background = '#F0F593';
	},
	
	off: function(a){
	  a.style.background = '#ECF1F1';
	}

}


