/*
Developed by grupo sdlnet (www.sdlnetwork.com)
*/

function abreventana(mipage,mititulo,ancho,alto)
{
	aWindow= open(mipage,mititulo,'scrollbars=no,toolbar=no,status=no,resizable=no,width=' + ancho + ',height=' + alto);
}


function abreventana02(mipage,mititulo,ancho,alto)
{
	aWindow= open(mipage,mititulo,'scrollbars=yes,toolbar=no,status=no,resizable=yes,width=' + ancho + ',height=' + alto);
}


function comprueba_email(dir)
{	
	var car='';
	var encon='no';
	var longi=dir.length;
	e=0;
	for (i=0;i<longi;i++)
	{
		car=dir.charAt(i);
		if (car=='@')
		{
			encon='si';
			posarroba=i;
		} 
    } 
	if (encon=='no')	
	{
		e=1;
	}  
	else
	{

   
		if (posarroba==0)
		{
			e=1;
		}
		else
		{

    
		    if (posarroba==dir.length - 1)
			{
				e=1;
			}
			else
			{	
			   
				car=dir.charAt(posarroba+1)
				if (car=='.')
				{
					e=1;
				}
				else
				{
					
      
					car=dir.charAt(dir.length - 1);
					if (car=='.')
					{
						e=1;
					} 
					else
					{

					 var ar2='';
					 encon2='no'
					 for(k=posarroba;k<dir.length;k++)
					 { 
					  car2=dir.charAt(k);
					  if (car2=='.')
					   {
					     encon2='si';
					   }  
					 }
					 
					 if (encon2=='no')
					  {
						e=1;
					  } 
					}
          
				}  	
    
			} 
	
		}	
	 
	}
	
	
	
	return e;
}




var search_icon_off = new Image(); 
search_icon_off.src = "img/site_search_icon_off.gif";

function CheckForm () {

if (document.frmSiteSearch.search.value==""){
	alert("Por favor introduzca por lo menos una palabra clave");
	document.frmSiteSearch.search.focus();
return false;
}
return true
}


function MouseOver(rc,rcOver)
{
if (!rc.contains(event.fromElement))
{
rc.style.cursor = 'hand';
rc.bgColor = rcOver;
}}

function MouseOut(rc,rcIn)
{
if (!rc.contains(event.toElement))
{
rc.style.cursor = 'default';
rc.bgColor = rcIn;
}}

function MouseClick(rc)
{
if(event.srcElement.tagName=='TD')
{
rc.children.tags('A')[0].click();
}}

function BorrarBuscar(){
	if (document.frmSiteSearch.search.value == "Buscar")
	document.frmSiteSearch.search.value = "";
}

/*
Live Date Script © Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/

var dayarray=new Array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado")
var montharray=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre")

function getthedate(){
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 hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<font face='Tahoma'>"+dayarray[day]+", "+daym+" "+montharray[month]+" "+year+", "+hours+":"+minutes+":"+seconds+" "+dn
+"</font>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}


    /*---------------------------------------------
    vscroll_banner
    ---------------------------------------------*/

function vscroll_data0()
{

	/*Note:  This implementation uses a gradient div to achieve the fade effect.  This div will cover
                 the up down button while in design view.  To manipulate the effect in design view use the
                 click and drag the message itself.*/

	this.enable_visual_design_mode = false;


 	this.container_width = 465
	this.container_height = 70
	this.top_pause_offset = 0

   

    /*---------------------------------------------
    Timing and Animation Speed
    ---------------------------------------------*/


	this.initial_scroll_delay = 0			//measured in seconds

	this.animation_delay = 30			//measured in milliseconds (1/1000)
	this.animation_jump = 1				//measured in pixels, must be > 1

	this.animation_delay_mac = 30			//measured in milliseconds (1/1000)
	this.animation_jump_mac = 8			//measured in pixels, must be > 1

  

    /*---------------------------------------------
    Item Styles and Padding
    ---------------------------------------------*/

	/* Note: this.Item_styles apply to all standard content in the scroll, while this.item_link_styles apply to content
                 within hyperlink tags only.  */


	this.container_styles = "";
	this.item_styles = "padding-left:10px;color:#333333; font-weight:bold; text-decoration:none; font-family:Arial; font-size:13px; border-style:none;border-width:0px;";
	this.item_link_styles = "color:#333333; font-weight:normal; text-decoration:none; font-family:Arial; font-size:13px; border-style:none;border-width:0px;";
	this.item_link_hover_styles = "color:#000000; font-weight:normal; text-decoration:none;";

}

