var actual=null;								 
												 
function menu(opt, subopt){
         var colorIgual=' color: #007283; ';
			   var color=' color: #FFFFFF; ';				 
				 var cssIgual = ' onMouseOver="this.style.color=\'#007283\';" onMouseOut="this.style.color=\'#007283\';" '
				 var css = ' onMouseOver="this.style.color=\'#007283\';" onMouseOut="this.style.color=\'#FFFFFF\';" '
				 var tmpOver;
				 var tmpColor;				 		 
         document.write('<table summary="" align="center" border="0" cellspacing="9" cellpadding="0" style="margin-top: -9px;">');
  			 document.write('  <tr>');
				 document.write('    <td width="144" valign="middle" align="center"><a href="/"><img border="0" src="images/Logo_zappoli.gif" alt=""></a></td>');

				 if(opt=='porfolio'){
				    document.write('		 <td width="144" height="144" background="images/Bot_porfolio02.gif" style="padding-left: 10px;">');						 

						tmpColor=(subopt == 'moda') ? colorIgual : color;
						tmpOver =(subopt == 'moda') ? cssIgual : css;	 							 							 						   
						document.write('     <div onClick="window.location=\'moda.html\'" ' + tmpOver + ' style="' + tmpColor + 'cursor:hand;font-family: verdana; font-size: 9px;">Moda</div>');
							 
						tmpColor=(subopt == 'musica') ? colorIgual : color;
						tmpOver =(subopt == 'musica') ? cssIgual : css;							 
					  document.write('        <div onClick="window.location=\'musica.html\'" ' + tmpOver + ' style="' + tmpColor + 'cursor:hand;font-family: verdana; font-size: 9px; margin-top: 3px;">Retratos - Musica</div>');
						
						tmpColor=(subopt == 'espacios') ? colorIgual : color;;
						tmpOver =(subopt == 'espacios') ? cssIgual : css;	 						
						document.write('        <div onClick="window.location=\'comerciales.html\'" ' + tmpOver + ' style="' + tmpColor + 'cursor:hand;font-family: verdana; font-size: 9px; margin-top: 3px;">Espacios Comerciales</div>');


						tmpColor=(subopt == 'gastronomia') ? colorIgual : color;
						tmpOver =(subopt == 'gastronomia') ? cssIgual : css;	 						 
						document.write('        <div onClick="window.location=\'gastronomia.html\'" ' + tmpOver + ' style="' + tmpColor + 'cursor:hand;font-family: verdana; font-size: 9px; margin-top: 3px;">Gastronomía</div>');

							 							 							 	 
						tmpColor = (subopt=='productos') ? colorIgual : color;
						tmpOver = (subopt=='productos') ? cssIgual : css;
						document.write('        <div onClick="window.location=\'productos.html\'" ' + tmpOver + ' style="' + tmpColor + 'cursor:hand;font-family: verdana; font-size: 9px; margin-top: 3px;">Productos</div>');					

						document.write('     </td>');
				 }else{
				 		document.write('		 <td><a href="moda.html"><img id="porfolio" onMouseOver="changeMenu(\'porfolio\',\'images/Bot_porfolio02.gif\');" onMouseOut="changeMenu(\'porfolio\',\'images/Bot_porfolio01.gif\');" border="0" src="images/Bot_porfolio01.gif" alt=""></a></td>');
				 }		
						
				 if(opt=='quienes')						
				    document.write('		 <td><img src="images/Bot_quienes02.gif" alt=""></td>');
				 else
				    document.write('		 <td><a href="quienes.html"><img border="0" id="quienes"  onMouseOver="changeMenu(\'quienes\',\'images/Bot_quienes02.gif\');" onMouseOut="changeMenu(\'quienes\',\'images/Bot_quienes01.gif\');" src="images/Bot_quienes01.gif" alt=""></a></td>');
				
				 if(opt=='clientes')								
				    document.write('		 <td><img src="images/Bot_clientes02.gif" alt=""></td>');
				 else
				    document.write('		 <td><a href="clientes.html"><img border="0" id="clientes" onMouseOver="changeMenu(\'clientes\',\'images/Bot_clientes02.gif\');" onMouseOut="changeMenu(\'clientes\',\'images/Bot_clientes01.gif\');" src="images/Bot_clientes01.gif" alt=""></a></td>');
						
				 if(opt=='contactos')												 				
				    document.write('		 <td><img src="images/Bot_contacto02.gif" alt=""></td>');
				 else
				    document.write('		 <td><a href="contacto.html"><img border="0" id="contactos" src="images/Bot_contacto01.gif" onMouseOver="changeMenu(\'contactos\',\'images/Bot_contacto02.gif\');" onMouseOut="changeMenu(\'contactos\',\'images/Bot_contacto01.gif\');" alt=""></a></td>');
					  						 				 																	 				
    		 document.write('  </tr>');
				 document.write('  </table>');
}

function changeMenu(id, image){
         document.getElementById(id).src=image;
}

function porfolio(tipo, filas, columnas, cantidad){
         var tmp = 1;
				 var val;
    		 for(a=1; a<=filas; a++){
				     document.write('<tr>');
				     for(b=1; b<=columnas; b++){						     
    						 if(tmp<10){
    						 		val = '0' + tmp;									    
    						 }else{
    						 		val = tmp;						 
    						 }
								 if(tmp<=cantidad)
						 		    document.write('<td><img id="' + tipo + tmp + '" onClick="clickPorfolio(\'' + tipo + '\',' + tmp + ');" onMouseOver="changePorfolio(\'' + tipo + '\',' + tmp + ', \'in\');" onMouseOut="changePorfolio(\'' + tipo + '\',' + tmp + ', \'out\');" style="margin: 0px 1px 1px 0px" src="porfolio/' + tipo + '/' + val + 'Min.jpg" alt=""></td>');
										
								 tmp++;						 
						 }
				     document.write('</tr>');						 				 					
				 }
}

function changePorfolio(tipo, id, inout){
         var idAux;
		     document.getElementById('txtPorfolio').innerHTML = eval(tipo)[id];
				 if(inout=='in'){
		        document.getElementById(tipo + id).src = 'images/Bot_select.gif';
						document.getElementById('txtPorfolio').innerHTML = eval(tipo)[id];
				 }else{
				    if(id<10){
				       idAux = '0' + id;
				    }else{
						   idAux = id;
						}
						if(actual!=id)
				       document.getElementById(tipo + id).src = 'porfolio/' + tipo + '/' + idAux + 'Min.jpg';
						document.getElementById('txtPorfolio').innerHTML = eval(tipo)[actual];
				 }						     				 				 
}


function clickPorfolio(tipo, id){
         var antAux;
         ant = actual 							 	 		
				 actual = id;	
				 document.getElementById('txtPorfolio').innerHTML = eval(tipo)[id];				 
		     if(id<10){
		        id = '0' + id;
		     }
 				 document.getElementById(tipo + actual).src = 'images/Bot_select.gif';//'porfolio/' + tipo + '/' + id + 'Min.jpg';
				 document.getElementById('imgPorfolioGde').src = 'porfolio/' + tipo + '/' + id + 'Gde.jpg';
				 if(ant!=null){
				  	antAux=(ant<10) ? '0' + ant : ant ;
				    document.getElementById(tipo + ant).src = 'porfolio/' + tipo + '/' + antAux + 'Min.jpg';
				 }		 					 				        
}

function valid(){
  if(document.frm.nombre.value==''){
    alert('Debe completar su Nombre y Apellido');
		return false;
  }
  if(document.frm.email.value==''){
    alert('Debe completar su E-Mail');
		return false;
  }
  if(document.frm.telefono.value==''){
    alert('Debe completar su Teléfono');
		return false;
  }		 
	return true;		    
}
