// JavaScript Document

function doit() {
		object = document.getElementById("carssubcategories");
		var disp = object.style.display = "block";
		object.style.display = disp;
}


function hideLayer(whichLayer) {
	if (document.getElementById) {
		// this is the way the standards work
		document.getElementById(whichLayer).style.visibility = "hidden";
	}
	else if (document.all) {
		// this is the way old msie versions work
		document.all[whichlayer].style.visibility = "hidden";
	}
	else if (document.layers) {
		// this is the way nn4 works
		document.layers[whichLayer].visibility = "hidden";
	}
}

function showLayer(whichLayer) {
	if (document.getElementById) {
		// this is the way the standards work
		document.getElementById(whichLayer).style.visibility = "visible";
		//document.getElementById(whichLayer).style.display = "table";
	}
	else if (document.all) {
		// this is the way old msie versions work
		document.all[whichlayer].style.visibility = "visible";
	}
	else if (document.layers) {
		// this is the way nn4 works
		document.layers[whichLayer].visibility = "visible";
	}
}

function handleClick() {

		// this is the way the standards work
		if (document.getElementById("inPicture").value.length != 0) {
			showLayer("boxthing");
		}

}


function updateCategory() {
	
	if (document.getElementById("inCategory").value == 9) {
		
		object = document.getElementById("carssubcategories");
		var disp = object.style.display = "block";
		object.style.display = disp;

	} else {
	
		object = document.getElementById("carssubcategories");
		var disp = object.style.display = "none";
		object.style.display = disp;

	}
}

function updateSearchCategory() {
	
	if (document.getElementById("cat").value == 9) {
		
		object = document.getElementById("carssubcategories");
		var disp = object.style.display = "block";
		object.style.display = disp;

	} else {
	
		object = document.getElementById("carssubcategories");
		var disp = object.style.display = "none";
		object.style.display = disp;

	}
}


function confirmAdmindel() {
	var agree=confirm("Confirm that you are admin wanting to remove this ad?");
if (agree)
	return true ;
else
	return false ;
}
