// JavaScript Document
function disableselect(e){   return false; }
function reEnable(){   return true; }
//if IE4+
//document.onselectstart=new Function ("return false");
//if NS6
//if (window.sidebar){   document.onmousedown=disableselect;  document.onclick=reEnable; } 


function checkEnviarComentario(form)
{
	
	if(!isLleno(form.nombre.value)){ alert('Por favor\nEscriba su nombre'); form.nombre.focus(); return false;}
	if(!isLleno(form.email.value)){ alert('Por favor\nEscriba su E-Mail'); form.email.focus(); return false;}
	if(!isEmail(form.email.value)){ alert('Por favor\nEscriba un E-Mail válido'); form.email.focus(); return false;}
	if(!isLleno(form.comentario.value)){ alert('Por favor\nEscriba su comentario'); form.comentario.focus(); return false;}
	
	return true;
	
	}
function letraMenos()
{
	
	if(document.getElementById('tt').value>1)
	{	
		document.getElementById('tt').value--;
		document.getElementById('noticia').className='textoVerNoticia'+document.getElementById('tt').value;
	}
	
	}
function letraMas(){
	
	if(document.getElementById('tt').value<9)
	{	
		document.getElementById('tt').value++;
		document.getElementById('noticia').className='textoVerNoticia'+document.getElementById('tt').value;
	}
	
	}
function letraNormal(){ document.getElementById('noticia').className='textoVerNoticia5'; document.getElementById('tt').value=5 }



function cerrarImgs(){ document.getElementById('imgs').style.display='none';
						document.getElementById('videos').style.display='block';
						
						}
function verImg(id)
				{
				
					document.getElementById('imgs').style.display='block';
					document.getElementById('videos').style.display='none';
					
					misimgs=document.getElementById('imgs');
					
					
					
					imagenes=misimgs.getElementsByTagName('div');
					
					
					for (var i=0; i<imagenes.length; i++) {
						
							if(imagenes[i].className=='contImgs'){
								
								if(imagenes[i].id==id)
								{	
										imagenes[i].style.display='block';
										document.getElementById('T'+imagenes[i].id).className='imgVerNA';
										//document.getElementById('imgIn'+imagenes[i].id).innerHTML='<img src="'+document.getElementById('WEBIMGS').value+document.getElementById('Nimg'+imagenes[i].id).innerHTML+'.jpg" />';
									//	document.getElementById('imgIn'+imagenes[i].id).src=document.getElementById('WEBIMGS').value+document.getElementById('Nimg'+imagenes[i].id).innerHTML+'.jpg';
								}
								else
								{
									imagenes[i].style.display='none';
									document.getElementById('T'+imagenes[i].id).className='imgVerN';
								}
							}
						
					}
					
					
				}
				

function inputAlert(input){ input.style.backgroundColor='#FFC0C0';}
function inputOk(input){ input.style.backgroundColor='#FFFFFF';}


function checkContacto(form)
{
	
	var completo=true;


	if(!isLleno(form.nombre.value)){ inputAlert(form.nombre); completo=false; }else{ inputOk(form.nombre); }	
	if(!isLleno(form.email.value)){ inputAlert(form.email); completo=false; }else{ inputOk(form.email); }	
	if(!isLleno(form.asunto.value)){ inputAlert(form.asunto); completo=false; }else{ inputOk(form.asunto); }	
	if(!isLleno(form.comentarios.value)){ inputAlert(form.comentarios); completo=false; }else{ inputOk(form.comentarios); }	
	
	if(!completo)
	{
		document.getElementById('msgs').innerHTML='*Por favor: completa los campos marcados<br />';
	
	}
	else
	{	$msg='';
		//Lógico
		
			if(!isEmail(form.email.value)){ inputAlert(form.email); $msg+='*El E-Mail es inválido<br />';  }else{ inputOk(form.email); }
			
			if($msg=='')
			{
				document.getElementById('msgs').innerHTML='<strong>Enviando...</strong>';
				document.getElementById('benviar').disabled=true;
				
				return true;
				
			}
			else
			{
				document.getElementById('msgs').innerHTML='<strong>VERIFIQUE LOS SIGUIENTES DATOS:</strong><br />'+$msg;
				
				}
	
	}
	
	
	return false;
	
	}
	
	
//radio motul

function menuRes(estado,obj){
	
	if(estado==1)
	{
		obj.className='menuSupItemOver';
		}else
		{
			obj.className='menuSupItem';
			
			
			}
	
	}
	
function mOv(obj){ obj.className='impO'; }
function mOu(obj){ obj.className='imp'; }

function mOvS(obj){ obj.className='impSO'; }
function mOuS(obj){ obj.className='impS'; }


function ReproductorRadio(reproductor)
{
	
	switch(reproductor)
	{
		
		case 'mediaplayer':
		
				
				popRadio(290,280,'radioMotul',true,'http://radiomotul.com.mx/radio_mediaplayer.html');
			
		
		break;
		case 'realplayer':
		
				popRadio(300,200,'radioMotul',true,'http://radiomotul.com.mx/radio_realplayer.html');
		
		break;
		case 'quicktime':
		
		
				popRadio(320,200,'radioMotul',true,'radio_quicktime.html');
		
		
		break;
		
		
		
		}
	
	
	
	}
	
function popRadio(nancho,nalto,winName,isscroll,theURL)
{ 
 
  var features;
  
  if(isscroll)
  features= "scrollbars=yes";
  else
  features= "scrollbars=no";
  
  features=features+",width="+nancho+",height="+nalto;
  var _W=window.open(theURL,winName,features); 
	_W.focus(); 
    _W.moveTo(30,30);	
	
	}
