function addToFavorites() {
	if(window.external && typeof window.external.AddFavorite != 'undefined'){
		window.external.AddFavorite(document.location, ':: Mexautos.com ::');
	}
}
function openWindow(url,width,height) {
 params = 'width=' + width + ',height=' + height;
 params+= ', scrollbars=0, resizeable=0, directories=0, status=0, menubar=0, location=0, toolbar=0';
 window.open(url,"newWindow",params);
}
function emailToFriend(id) {
	openWindow('email_to_friend.php?id='+id, 500, 350);
}
function showAdPhotos(id) {
	openWindow('photos.php?id='+id, 646, 579);
}
function typeChange(form) {
	form.refreshForm.value = 'true';
	form.submit();
}
function displayValues(myForm) {
	if(myForm.combo_type.value == 'CAR')
	{
		if(myForm.carMake.selectedIndex == -1 && myForm.makeOther.value == "") {
			alert('Seleccione o escriba Marca');
			return false;
		}
		if(myForm.carModel.selectedIndex == -1 && myForm.modelOther.value == "") {
			alert('Seleccione o escriba Modelo');
			return false;
		}
		alert('MakeID = ' + myForm.carMake[myForm.carMake.selectedIndex].value + '\nModelID = ' + myForm.carModel[myForm.carModel.selectedIndex].value);
		return false;
	}
	if(myForm.combo_type.value == 'MOTO')
	{
		if(myForm.combo_moto_make.selectedIndex == -1 && myForm.motoOther.value == "") {
			alert('Seleccione Marca');
			return false;
		}
	}
}
function changePriceTo(priceFrom) {
	priceTo = document.getElementById('priceTo');
	if (!priceTo || !priceFrom) return false;
	priceTo.selectedIndex = priceFrom.selectedIndex;
}