function cambiarI(imagen){
	dir=imagen.src;
	dir2=imagen.src;
	n=String(dir).length-4;
	dir=String(dir2).substring(0,n);
	ext=String(dir2).substring(n,n+4)
	imagen.src=dir + "_b" + ext;
	}
	
function volverI(imagen){
	dir=imagen.src;
	dir2=imagen.src;
	n=String(dir).length-6;
	n2=String(dir).length-4;
	ext=String(dir2).substring(n2,n2+4)
	dir=String(dir2).substring(0,n);
	imagen.src=dir + ext;
	}

function zoomF(tam,sec,id,num) {

 		url="zoomImage.php?ID=" + id + "&Numero=" + num + "&Seccion=" + sec + "&tam=" + tam;
		
		if(tam==0){
		params  = 'width=690';
 		params += ', height=480';
 		params += ', top=' + ((screen.height-480)/2) + ', left=0'+((screen.width-690)/2);
 		params += ', fullscreen=no,menubar=0,resizable=0';
		}else{
		params  = 'width=470';
 		params += ', height=620';
 		params += ', top=' + ((screen.height-620)/2) + ', left=0'+((screen.width-470)/2);
 		params += ', fullscreen=no,menubar=no,resizable=no';	
		}

 		newwin=window.open(url,'windowname4', params);
 			if (window.focus) {newwin.focus()}
 		
		}

function zoomF2(tam,dir) {

 		url="zoomImage2.php?url=" + dir + "&tam=" + tam;
		
		if(tam==0){
		params  = 'width=690';
 		params += ', height=480';
 		params += ', top=' + ((screen.height-480)/2) + ', left=0'+((screen.width-690)/2);
 		params += ', fullscreen=no,menubar=0,resizable=0';
		}else{
		params  = 'width=470';
 		params += ', height=620';
 		params += ', top=' + ((screen.height-620)/2) + ', left=0'+((screen.width-470)/2);
 		params += ', fullscreen=no,menubar=no,resizable=no';	
		}

 		newwin=window.open(url,'windowname4', params);
 			if (window.focus) {newwin.focus()}
 		
		}

function mostrarVideo(numero) {

 		url="http://www.vw.com.ve/prueba/Concesionarios/1/Anuncios/video/Video.php?id=" + numero;
		
		params  = 'width='+screen.width;
 		params += ', height='+screen.height;
 		params += ', top=0, left=0';
 		params += ', fullscreen=yes';

 		newwin=window.open(url,'windowname4', params);
 			if (window.focus) {newwin.focus()}
 		return false;
		}

function ajax(pagina, div) {
	var conexion = new XHConn();
	if(!conexion)
		alert('XMLHTTP no disponible. Se requiere un navegador mas reciente.');

	//	FUNCION QUE EJECUTA DESPUES DE CONECTAR A LA PAGINA
	var cuandotermines = function (oXML){
		var control = document.getElementById(div);
		
		//if (oXML.responseText=='true'){
			control.innerHTML = oXML.responseText

		/*else
			div.style.display='none';*/
	};
	
	// FUNCION QUE CONECTA A LA PAGINA
	conexion.connect(pagina, 'POST', '', cuandotermines);
}


function ajaxconpost(pagina, div, string) {
	var conexion = new XHConn();
	if(!conexion)
		alert('XMLHTTP no disponible. Se requiere un navegador mas reciente.');

	//	FUNCION QUE EJECUTA DESPUES DE CONECTAR A LA PAGINA
	var cuandotermines = function (oXML){
		var control = document.getElementById(div);
		
		//if (oXML.responseText=='true'){
			control.innerHTML = oXML.responseText

		/*else
			div.style.display='none';*/
	};
	
	// FUNCION QUE CONECTA A LA PAGINA
	conexion.connect(pagina, 'POST', string, cuandotermines);
}