<!--
function mOvr(src) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = "#96A6B4";
	}
  }
  function mOut(src) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = "#A5B5C6";
	}
  }
  function mClk(src) {
    if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();
    }
  }
// -->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
  }
}
function Ventana(url,options,name){
	x=window.open(url,name,options); 
}

/*Current date script credit: 
Website Abstraction (www.wsabstract.com)
Over 200+ free scripts here!
*/

var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var montharray=new Array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre")


<!--
function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {

// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 2.1.8

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}

	var agt=navigator.userAgent.toLowerCase(); 
	var is_opera = (agt.indexOf("opera") != -1); 

	if (is_opera == true){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {

	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+'height='+imageHeight+' alt="Pulsa sobre la imagen para cerrar" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}
//-->


//Function to open pop up window
function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}


//Funcion banner lateral

var posicionSup = 100; 
var tunIex=navigator.appName=="Microsoft Internet Explorer"?true:false;
if(tunIex && navigator.userAgent.indexOf('Opera')>=0){tunIex = false}
function posicion(){
	tunpopup = document.getElementById('popup')
	tunpopup2 = document.getElementById('popup2')
	var scrollarriba=document.body.scrollTop;
	scrollarriba += posicionSup;
	tunpopup.style.top=scrollarriba + "px";
	tunpopup2.style.top=scrollarriba + "px";
	
}
function iniciapopup(){
	tunpopup = document.getElementById('popup')
	tunpopup.style.top = posicionSup + "px";
	if(tunIex){
		tunpopup.style.position='absolute'
		onscroll = posicion;
	}
	else{tunpopup.style.position='fixed'} 
}
function iniciapopup2(){
	tunpopup2 = document.getElementById('popup2')
	tunpopup2.style.top = posicionSup + "px";
	if(tunIex){
		tunpopup2.style.position='absolute'
		onscroll = posicion;
	}
	else{tunpopup2.style.position='fixed'} 
}
function cerrar(){ 
popup.style.visibility="hidden" 
} 
 function alfanumerico(e){
   
 tecla = (document.all) ? e.keyCode : e.which; 
		
   if (tecla==8) return true; 
   patron =/[0-9A-Za-z\s]/; 
   test = String.fromCharCode(tecla); 
   return patron.test(test); 
  
 }
 
 function ShowComboNumerico(Combo, ini, fin , intervalo, tipo, selected){
	 
	var option0;
	var j;
	j = 0;
	if (tipo=="asc"){
		for (i=ini;i<=fin;i=i+intervalo) {
			option0 = new Option(i,i);
			Combo.options[j] = option0;
			if (selected==i) Combo.options[j].selected = true;
			j = j + 1;
		}
	}else{
		for (i=ini;i>=fin;i=i-intervalo) {
			option0 = new Option(i,i);
			Combo.options[j] = option0;
			if (selected==i) Combo.options[j].selected = true;
			j = j + 1;
		}
	}
	
}

function valida_correo(email){
	regx = /^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z\-])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/;
	return regx.test(email);
}

