// Common Javascript Functions

function hover(id){
	id.src="/images/star.png";
}

function out(id){
	id.src="/images/hollowstar.png";
}

// ajax functions

function show_ajax(div,url){
	document.getElementById(div).style.visibility='hidden';
	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){
				return false; // ajax not supported
			}
		}
	}
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			document.getElementById(div).innerHTML=xmlHttp.responseText;
			document.getElementById(div).style.visibility='visible';
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function hide_div(div) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(div).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.div.display = 'none';
		}
		else { // IE 4
			document.all.div.style.display = 'none';
		}
	}
}

function show_div(div) {
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(div).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.div.display = 'block';
		}
		else { // IE 4
			document.all.div.style.display = 'block';
		}
	}
} 
