function popUp(URL,Width,Height,Location) {
	if (!Width) {Width = 800;}
	if (!Height) {Height = 600;}
	if (!Location) {Location = 0;}
	day = new Date();	id = day.getTime();
	eval("page"+id+" = window.open(URL, '"+id+"', 'width="+Width+", height="+Height+", top=10, left=10, location="+Location+", toolbar=1, scrollbars=1, statusbar=0, menubar=0, resizable=1');");
} 	
function Toggle(WHAT) {if (document.getElementById(WHAT).style.display == "block") {Hide(WHAT);} else {Display(WHAT);}}		
function Hide(WHAT) {document.getElementById(WHAT).style.display = "none";}
function Display(WHAT) {document.getElementById(WHAT).style.display = "block";}
function Activate(ITEM) {document.getElementById(ITEM).className = 'active';}
function CatChange(CATURL) {if (CATURL!="NoListings") {top.location.href = CATURL;}}
function ChangeClass(DIV, CLASS) {document.getElementById(DIV).className = CLASS;}
function JumpTo(WHERE) {location.hash = WHERE;}
function Expand(TEXTAREA) {document.getElementById(TEXTAREA).style.height = 0; document.getElementById(TEXTAREA).style.height = document.getElementById(TEXTAREA).scrollHeight+'px'; if (document.getElementById(TEXTAREA).scrollHeight<150) {document.getElementById(TEXTAREA).style.height = '150px';}}
function UpdateForm(FORM,FIELD,VALUE) {document.forms[FORM].elements[FIELD].value = VALUE;}
function DisplayAds() {
	if (document.getElementById("ad_platinum")) {document.getElementById("ad_platinum").className = "ad platinum";}
	if (document.getElementById("ad_gold")) {document.getElementById("ad_gold").className = "ad gold";}
	if (document.getElementById("ad_silver")) {document.getElementById("ad_silver").className = "ad silver";}
	if (document.getElementById("ad_bronze")) {document.getElementById("ad_bronze").className = "ad bronze";}
	if (document.getElementById("ad_gold2")) {document.getElementById("ad_gold2").className = "ad gold second";}
	if (document.getElementById("ad_silver2")) {document.getElementById("ad_silver2").className = "ad silver second";}
	if (document.getElementById("ad_bronze2")) {document.getElementById("ad_bronze2").className = "ad bronze second";}
	window.location.hash = "topofpage";
}
function AJAX(SCRIPT,DIV) {
	if (window.XMLHttpRequest) {xmlhttp=new XMLHttpRequest();} else {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
	xmlhttp.onreadystatechange = function() {if (xmlhttp.readyState==4 && xmlhttp.status==200) {document.getElementById(DIV).innerHTML = xmlhttp.responseText;}};
	xmlhttp.open("GET",SCRIPT,true);
	xmlhttp.send();
}

