///////////////////////
function muestra_oculta(Id)
{
	if (document.getElementById)
	{ //se obtiene el id
		var el = document.getElementById(Id); //se define la variable "el" igual a nuestro div
		el.style.display = (el.style.display == 'none') ? 'block' : 'none'; //damos un atributo display:none que oculta el div
	}
}
window.onload = function()
{/*hace que se cargue la función lo que predetermina que div estará oculto hasta llamar a la función nuevamente*/
muestra_oculta('compartir');/* "contenido_a_mostrar" es el nombre que le dimos al DIV */

}
///////////////////////////////
////////////
function esInteger(e){
var charCode
if (navigator.appName == "Netscape"){
charCode = e.which
}
else{
charCode = e.keyCode}	
if (charCode < 48 || charCode > 57){
alert("Por favor teclee solo numeros en este campo!");	
return false
}
else{
return true}
}
///////////////////
function subida()
{    	
	if(document.formsub.regiones.value.length==0)
	{
	   	 alert("REGION"); 
		 document.formsub.regiones.focus();
		 return 0;
	}
	if(document.formsub.ciudades.value.length==0)
	{
	   	 alert("ciudades"); 
		 document.formsub.ciudades.focus();
		 return 0;
	}
	if(document.formsub.categoria.value.length==0)
	{
	   	 alert("CATEGORIA"); 
		 document.formsub.categoria.focus();
		 return 0;
	}
	if(document.formsub.producto.value.length==0)
	{
	   	 alert("PRODUCTO"); 
		 document.formsub.producto.focus();		 
		 return 0;
	}
	if(document.formsub.precio.value.length==0)
	{
	   	 alert("PRECIO"); 
		 document.formsub.precio.focus();		 
		 return 0;
	}
	if(document.formsub.descripcion.value.length==0)
	{
	   	 alert("DESCRIPCION"); 
		 document.formsub.descripcion.focus();		 
		 return 0;
	}
	if(document.formsub.contacto.value.length==0)
	{
	   	 alert("CONTACTO"); 
		 document.formsub.contacto.focus();		 
		 return 0;
	}
	if(document.formsub.file.value.length==0)
	{
	   	 alert("IMAGEN PRINCIPAL PRODUCTO"); 
		 document.formsub.file.focus();		 
		 return 0;
	}
	/*if(document.formsub.file2.value.length==0)
	{
	   	 alert("IMAGEN 2 PRODUCTO"); 
		 document.formsub.file2.focus();		 
		 return 0;
	}
	if(document.formsub.file3.value.length==0)
	{
	   	 alert("IMAGEN 3 PRODUCTO"); 
		 document.formsub.file3.focus();		 
		 return 0;
	}	*/
	if(!document.formsub.check.checked)
	{
		alert("Acepte terminos y condiciondes de Chileventas.cl")
		document.formsub.check.focus();		 
		return 0 ;
	}
	
	document.formsub.submit();
} 
////////////////////////////////
function slctr(texto,valor){
this.texto = texto
this.valor = valor
}
var los_lagos=new Array()
los_lagos[0] = new slctr('')
los_lagos[1] = new slctr("Osorno",'Osorno')
los_lagos[2] = new slctr("Pto Montt",'Pto Montt')


var los_rios=new Array()
los_rios[0] = new slctr('')
los_rios[1] = new slctr("Valdivia",'Valdivia')
los_rios[2] = new slctr("Rio Bueno",'Rio Bueno')



function slctryole(cual,donde){
if(cual.selectedIndex != 0){
	donde.length=0
	cual = eval(cual.value)
	for(m=0;m<cual.length;m++){
		var nuevaOpcion = new Option(cual[m].texto);
		donde.options[m] = nuevaOpcion;
		if(cual[m].valor != null){
			donde.options[m].value = cual[m].valor
			}
		else{
			donde.options[m].value = cual[m].texto
			}
		}
	}
}
//////////////////
// <![CDATA[

SI.Files.stylizeAll();

/*
--------------------------------
Known to work in:
--------------------------------
- IE 5.5+
- Firefox 1.5+
- Safari 2+
                          
--------------------------------
Known to degrade gracefully in:
--------------------------------
- Opera
- IE 5.01

--------------------------------
Optional configuration:

Change before making method calls.
--------------------------------
SI.Files.htmlClass = 'SI-FILES-STYLIZED';
SI.Files.fileClass = 'file';
SI.Files.wrapClass = 'cabinet';

--------------------------------
Alternate methods:
--------------------------------
SI.Files.stylizeById('input-id');
SI.Files.stylize(HTMLInputNode);

--------------------------------
*/

// ]]>

//////////////
///////////////////////////////////////////////////
///////////////////////////////////////////////////////////

