function focuS(o,p) {
	if (o.value==p) o.value="";
}
function bluR(o,p) {
	if (o.value=='') o.value=p;
}
function cancelForm(o) {
	if (confirm('Are you sue you want to cancel?'))
		window.location.href=o;
}
function change(c) { // Changes VSpecs/Features tabs
	if (c=="features") {
		 document.getElementById('vspecs').style.display="none";
		 document.getElementById(c).style.display="block";
	} else if (c=="vspecs") {
		 document.getElementById('features').style.display="none";
		 document.getElementById(c).style.display="block";
	}
}
function Edit(o){// for editing titles & custom paragraphs etc
	if (document.getElementById("e"+o).style.display=="none") {
	  document.getElementById(o).style.display = 'none';
	  document.getElementById("e"+o).style.display = 'block';
	} else {
	  document.getElementById("e"+o).style.display = 'none';
	  document.getElementById(o).style.display = 'block';
	}
}
function submiT(o) {
	var form = o;
	document.form.submit();
}
function deleteCar(o) {
	if (confirm('Are you sure you want to delete this car permanently?\nThis cannot be undone!'))
	window.location.href = "addcar.php?delete=" + o;
}
function makeLive(i,o) {
	if (confirm('Are you sure?'))
	window.location.href = "addcar.php?makelive=" + o;
	else {
		if (i.checked==0)
			i.checked=1;
		else
			i.checked=0;
	}
}
function makeFeatured(i,o) {
	if (confirm('Are you sure?'))
		window.location.href = "addcar.php?makefeatured=" + o;
	else {
		if (i.checked==0)
			i.checked=1;
		else
			i.checked=0;
	}
}
function makeSold(i,o) {
	if (confirm('Are you sure?'))
	window.location.href = "addcar.php?makesold=" + o;
	else {
		if (i.checked==0)
			i.checked=1;
		else
			i.checked=0;
	}
}
function numberOnly(o){
  o.value = o.value.replace(/[^\d]/g,'');
}
var height = "150px";
function textArea(o) {
	if (o.style.height == height)
		o.style.height = "50px";
	else
		o.style.height = height;
}
var myimages=new Array();
function preloadimages(){
	for (i=0;i<preloadimages.arguments.length;i++){
		myimages[i]=new Image()
		myimages[i].src=preloadimages.arguments[i]
	}
}