// JavaScript Document

function bigPhoto(x) {
	
	
	newHTML = '<img src="'+x+'" width="252" height="188" />';
	
	document.getElementById('photo').innerHTML=newHTML;
	
}



function sendVendedor(x) {
	
	
	var newHTML = "<form action='verAnuncio.php?id="+x+"' method='post' onSubmit='return Validate(this);'> <table width='400' border='0'>          <tr>            <th colspan='2' scope='row'>ENVIA COMENTARIO AL VENDEDOR</th>            </tr>          <tr>            <th scope='row'>Nombre</th>            <td>               <input type='text' name='nombre' id='nombre' validate='not_empty'>            </td>          </tr>          <tr>            <th scope='row'>Telefono</th>            <td><input type='text' name='telefono' id='telefono'> </td>          </tr>          <tr>            <th scope='row'>E-mail</th>            <td><input type='text' name='email' id='email' validate='not_empty|email'> </td>          </tr>          <tr>            <th scope='row'>Comentarios</th>            <td>               <textarea name='comentarios' id='comentarios' cols='45' rows='5'></textarea>             </td>          </tr>          <tr>            <th scope='row'>&nbsp;</th>            <td>          <input type='submit' name='button' id='button' value='Enviar'> <input type='hidden' name='operacion' id='operacion' value='vendedor'> 					<input type='hidden' name='id' id='id' value='"+x+"'>             </td>          </tr>                  </table>            </form>";
	 
	
	document.getElementById('operacion').innerHTML=newHTML;
	
}



function sendAmigo(x) {
	
	
	var newHTML = "<form action='verAnuncio.php?id="+x+"' method='post' onSubmit='return Validate(this);'> <table width='400' border='0'>          <tr>            <th colspan='2' scope='row'>RECOMIENDA ESTE AUTO A UN AMIGO</th>            </tr>          <tr>            <th scope='row'>Tu nombre</th>            <td>               <input type='text' name='nombre' id='nombre' validate='not_empty'>            </td>          </tr>                  <tr>            <th scope='row'>Tu E-mail</th>            <td><input type='text' name='email' id='email' validate='not_empty|email'> </td>          </tr>   <tr>            <th scope='row'>E-mail de tu amigo</th>            <td><input type='text' name='emailamigo' id='emailamigo' validate='not_empty|email'> </td>          </tr>          <tr>            <th scope='row'>Comentarios</th>            <td>               <textarea name='comentarios' id='comentarios' cols='30' rows='5'></textarea>             </td>          </tr>          <tr>            <th scope='row'>&nbsp;</th>            <td>               <input type='submit' name='button' id='button' value='Enviar'> <input type='hidden' name='operacion' id='operacion' value='amigo'>   <input type='hidden' name='id' id='id' value='"+x+"'>          </td>          </tr>                  </table>            </form>";
	 
	
	document.getElementById('operacion').innerHTML=newHTML;
	
}



