  <!--
    var menues		  = new Array();
    menues[0]	      = 'identia';
    menues[1]		    = 'clientes';

    var currentTop	= 0;
	
	// Current Page Reference
// copyright Stephen Chapman, 1st Jan 2005
// you may copy this function but please keep the copyright notice with it
function getURL(uri) {
	uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
	uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
	uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
	uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
	pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
	uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
	uri.file = uri.page;
	if (uri.ext != '') uri.file += '.' + uri.ext;
	if (uri.file == '') uri.page = 'index';
	uri.args = location.search.substr(1).split("?");
	return uri;
}
var uri = new Object();
getURL(uri);
                  
	
	function checkFormFields(frm,arr,idioma){ //(formulario, array de campos a validar)
			
			var aux="";
			for(var i=0;i<document.getElementById(frm).elements.length;i++){
       			if(document.getElementById(frm).elements[i].type == "password" || document.getElementById(frm).elements[i].type == "text" || document.getElementById(frm).elements[i].type == "select"  || document.getElementById(frm).elements[i].type == "textarea" || document.getElementById(frm).elements[i].type == "select-one" || document.getElementById(frm).elements[i].type == "select multiple" || document.getElementById(frm).elements[i].type == "select-multiple"){
					if(in_array(arr,document.getElementById(frm).elements[i].id)){ 
						if(document.getElementById(frm).elements[i].value==""){
							aux=aux+"\n"+document.getElementById(frm).elements[i].title;
						}
						else{
							if(document.getElementById(frm).elements[i].id.toLowerCase().indexOf('email')!=-1){
								if(!emailCheck(document.getElementById(frm).elements[i].value)){
									aux=aux+"\n"+document.getElementById(frm).elements[i].title;
								}
							}	
						}
					}
					
				}	
		   }
		 
		   if(aux!=""){
				if(idioma=='es'){
					aux="Debe completar los siguientes campos:" + aux;
				}
				if(idioma=='en'){
					aux="You must complete these fields:" + aux;
				}
			   	alert(aux);
				return false;
		   }
		   else{
				return true;
		   }	
	}	

  function in_array(mat,field){
			var i;

			for(i=0;i<mat.length;i++){
				if(mat[i]==field){
					return true;
				}
				/*
				if(mat[i].toLowerCase()==field.toLowerCase()){
					return true;
				}	
 			  */
	
			}
			
			return false;	
 }

 function showSendClipping(id){
	var ajax = new Ajax();
	ajax.handleResp=function(resp){
		Dialog.info(resp, {width:343, height:164, showProgress: false});
	}	
	ajax.doAsyncRequest("_ajax.php","GET","text","opc=showSendClipping&id="+id);   
 }
 
 function clippingSend(name,email,id){
   var ajax = new Ajax();
   document.getElementById('sendingMsg').innerHTML='<b>Enviando...</b>';
   ajax.handleResp=function(resp){
		//Dialog.closeInfo();
		if(resp==1){
			document.getElementById('sendingMsg').innerHTML='<b>Se ha enviado con éxito!</b>';
			//alert("Se ha enviado con éxito.");	

		}
		else{
			document.getElementById('sendingMsg').innerHTML='<b>Error. No pudo enviarse.</b>';
			//alert("Error. No pudo enviarse");				
		}
   }	
   ajax.doAsyncRequest("_ajax.php","GET","text","opc=clippingSendEmail&name="+name+"&email="+email+"&id="+id);
  }
   
   var win=null;
   var loginHTML=null;
   
   var centroInnerHtml="";
   function showClippingLogin(){
	var ajax = new Ajax();
	ajax.handleResp=function(resp){
		Dialog.info(resp, {width:343, height:164, showProgress: false});
	}
	
	if(uri.file.indexOf('index.php')!=-1 || uri.file==""){
		centroInnerHtml=document.getElementById('centro').innerHTML;
		document.getElementById('centro').innerHTML='<img src="img/flash-snap.jpg">';
	}
	ajax.doAsyncRequest("_ajax.php","GET","text","opc=showClippingLogin");
   }
   
   function cerrarLogin(){
	   if(uri.file.indexOf('index.php')!=-1 || uri.file==""){
			window.location.href=window.location.href;   
	   }
   		Dialog.closeInfo();
   }
   
   function clippingLogin(user,password){
	   var ajax = new Ajax();
	   ajax.handleResp=function(resp){
			if(resp==1){
				window.location.href='clipping_list.php';
			}
			else{
				alert("Usuario o contraseña incorrectos.");	
			}
	   }	
	   ajax.doAsyncRequest("_ajax.php","GET","text","opc=clippingLogin&user="+user+"&password="+password);
   }
   
   function showRecuperar(){
	var ajax = new Ajax();
	ajax.handleResp=function(resp){
		//Dialog.info(resp, {width:343, height:164, showProgress: false});
		document.getElementById(Dialog.dialogId).innerHTML=resp;
	}	
	ajax.doAsyncRequest("_ajax.php","GET","text","opc=showRecuperar");
   }
   
   function sendRecuperar(email){
  	    var ajax = new Ajax();
		document.getElementById('sendingMsg').innerHTML='<b>Enviando...</b>';
		ajax.handleResp=function(resp){
			if(resp=="2"){	
				document.getElementById('sendingMsg').innerHTML='<b>Error. Email no registrado.</b>';
			}
			if(resp=="1"){	
				document.getElementById('sendingMsg').innerHTML='<b>La contraseña fue enviada a la cuenta de correo ingresada.</b>';
			}
			if(resp=="0"){
				document.getElementById('sendingMsg').innerHTML='<b>Error. No pudo enviarse,</b>';
			}
		}
		
		ajax.doAsyncRequest("_ajax.php","GET","text","opc=sendRecuperarPassword&email="+email);
   }
   
   function clippingLogout(){
	   var ajax = new Ajax();
	   ajax.handleResp=function(resp){
	     window.location.href='index.php';
	   }	
	   ajax.doAsyncRequest("_ajax.php","GET","text","opc=clippingLogout");
   }
   
   
   function rotarNoticias( ) {
      if ( document.getElementById('descripcionNoticia') ) {
        ark_do( '_ark.php?accion=mostrarNoticia' );
      }
      else {
        clearInterval( interval );
      }
    }
    var interval    = setInterval( "rotarNoticias( );", 10000 );

    function mostrarMenu( current ) {
      for ( var i = 0; i < menues.length; i++ ) {
        if ( current == menues[i] ) {
          document.getElementById( 'menu_' + menues[i] ).style.display 	= '';
        }
        else {
          document.getElementById( 'menu_' + menues[i] ).style.display	= 'none';
        }
      }
    }

    function ocultarMenu( ) {
      mostrarMenu( '' );
    }

    function mostrarNombre( index, all ) {
      ocultarTodos( all );
      if ( document.getElementById( 'nombre' + index ) ) {
        document.getElementById( 'nombre' + index ).style.display  		  = 'block';
      }
    }

    function ocultarNombre( index ) {
      if ( document.getElementById( 'nombre' + index ) ) {
        document.getElementById( 'nombre' + index ).style.display  		  = 'none';
      }
    }

    function ocultarTodos( all ) {
      for ( var index = 0; index < all; index++ ) {
        if ( document.getElementById( 'nombre' + index ) ) {
          document.getElementById( 'nombre' + index ).style.display  	  = 'none';
        }
      }
    }

    function marcarMenu( elem, bgcolor ) {
      if ( elem.style.backgroundColor ) {
        elem.style.backgroundColor	= bgcolor;
      }
    }

    function scrollBox( box, pixels, direction ) {
      offset            = pixels;
      move              = direction;
      elem              = document.getElementById( box );
      height            = parseFloat(elem.style.height);
      interval          = setInterval( 'scrollThis( elem, move, offset, height );', 10 );
    }

    function scrollThis( elem, move, offset, height ) {
      if ( move == 'down' && elem.scrollTop + height < elem.scrollHeight && elem.scrollTop < currentTop + offset - 5 ) {
        elem.scrollTop += ( currentTop + offset - elem.scrollTop + 5 ) * 0.2;
      }
      else if ( move == 'up' && elem.scrollTop > 0 && elem.scrollTop > currentTop - offset + 5 ) {
        elem.scrollTop -= ( offset - currentTop + elem.scrollTop  ) * 0.2;
      }
      else {
        clearInterval(interval);
        currentTop      = elem.scrollTop;
      }
    }

    function shiftUpDown( elem ) {
      if ( event.wheelDelta > 0 )
        scrollBox( elem, 100, 'up'   );
      else
        scrollBox( elem, 100, 'down' );
    }


//  --------------------------------------------------------------------------- ::: - ::: - ::: -------
//  --------------------------------------------------------------------------- ::: - ::: - ::: -------

    function AC_AddExtension( src, ext ) {
      if (src.indexOf('?') != -1)
        return src.replace(/\?/, ext+'?'); 
      else
        return src + ext;
    }

    function AC_Generateobj( objAttrs, params, embedAttrs ) { 
      var str  = '<object  ';
      for ( var i in objAttrs )
        str   += i + '="' + objAttrs[i] + '" ';
      str     += '>';
      for ( var i in params )
        str   += '<param name="' + i + '" value="' + params[i] + '" /> ';
      str     += '<embed  ';
      for ( var i in embedAttrs )
        str   += i + '="' + embedAttrs[i] + '" ';
      str     += ' ></embed></object>';
      document.write(str);
    }

    function AC_FL_RunContent( ) {
      var ret = AC_GetArgs (  arguments, '.swf', 'movie', 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000', 'application/x-shockwave-flash' );
      AC_Generateobj( ret.objAttrs, ret.params, ret.embedAttrs );
    }

    function AC_SW_RunContent(){
      var ret = AC_GetArgs(  arguments, '.dcr', 'src', 'clsid:166B1BCA-3F9C-11CF-8075-444553540000', null );
      AC_Generateobj( ret.objAttrs, ret.params, ret.embedAttrs );
    }

    function AC_GetArgs( args, ext, srcParamName, classid, mimeType ){
      var ret        = new Object();
      ret.embedAttrs = new Object();
      ret.params     = new Object();
      ret.objAttrs   = new Object();
      for ( var i = 0; i < args.length; i = i+2 ) {
        var currArg  = args[i].toLowerCase();    

        switch (currArg){	
          case 'classid':
            break;
          case 'pluginspage':
            ret.embedAttrs[args[i]]        = args[i+1];
            break;
          case 'src':
          case 'movie':	
            args[i+1]                      = AC_AddExtension(args[i+1], ext);
            ret.embedAttrs['src']          = args[i+1];
            ret.params[srcParamName]       = args[i+1];
            break;
          case 'onafterupdate':
          case 'onbeforeupdate':
          case 'onblur':
        case 'oncellchange':
          case 'onclick':
          case 'ondblClick':
          case 'ondrag':
          case 'ondragend':
          case 'ondragenter':
          case 'ondragleave':
          case 'ondragover':
          case 'ondrop':
          case 'onfinish':
          case 'onfocus':
          case 'onhelp':
          case 'onmousedown':
          case 'onmouseup':
          case 'onmouseover':
          case 'onmousemove':
          case 'onmouseout':
          case 'onkeypress':
          case 'onkeydown':
          case 'onkeyup':
          case 'onload':
          case 'onlosecapture':
          case 'onpropertychange':
          case 'onreadystatechange':
          case 'onrowsdelete':
          case 'onrowenter':
          case 'onrowexit':
          case 'onrowsinserted':
          case 'onstart':
          case 'onscroll':
          case 'onbeforeeditfocus':
          case 'onactivate':
          case 'onbeforedeactivate':
          case 'ondeactivate':
          case 'type':
          case 'codebase':
            ret.objAttrs[args[i]]          = args[i+1];
            break;
          case 'width':
          case 'height':
          case 'align':
          case 'vspace': 
          case 'hspace':
          case 'class':
          case 'title':
          case 'accesskey':
          case 'name':
          case 'id':
          case 'tabindex':
            ret.embedAttrs[args[i]]        = ret.objAttrs[args[i]] = args[i+1];
            break;
          default:
            ret.embedAttrs[args[i]]        = ret.params[args[i]] = args[i+1];
        }
      }
      ret.objAttrs['classid']              = classid;
      if (mimeType) ret.embedAttrs['type'] = mimeType;
      return ret;
    }
function emailCheck (emailStr) {
	/* The following pattern is used to check if the entered e-mail address
	   fits the user@domain format.  It also is used to separate the username
	   from the domain. */
	var emailPat=/^(.+)@(.+)$/
	/* The following string represents the pattern for matching all special
	   characters.  We don't want to allow special characters in the address. 
	   These characters include ( ) < > @ , ; : \ " . [ ]    */
	var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
	/* The following string represents the range of characters allowed in a 
	   username or domainname.  It really states which chars aren't allowed. */
	var validChars="\[^\\s" + specialChars + "\]"
	/* The following pattern applies if the "user" is a quoted string (in
	   which case, there are no rules about which characters are allowed
	   and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
	   is a legal e-mail address. */
	var quotedUser="(\"[^\"]*\")"
	/* The following pattern applies for domains that are IP addresses,
	   rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
	   e-mail address. NOTE: The square brackets are required. */
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
	/* The following string represents an atom (basically a series of
	   non-special characters.) */
	var atom=validChars + '+'
	/* The following string represents one word in the typical username.
	   For example, in john.doe@somewhere.com, john and doe are words.
	   Basically, a word is either an atom or quoted string. */
	var word="(" + atom + "|" + quotedUser + ")"
	// The following pattern describes the structure of the user
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
	/* The following pattern describes the structure of a normal symbolic
	   domain, as opposed to ipDomainPat, shown above. */
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
	
	
	/* Finally, let's start trying to figure out if the supplied address is
	   valid. */
	
	/* Begin with the coarse pattern to simply break up user@domain into
	   different pieces that are easy to analyze. */
	var matchArray=emailStr.match(emailPat)
	if (matchArray==null) {
	  /* Too many/few @'s or something; basically, this address doesn't
		 even fit the general mould of a valid e-mail address. */
		//alert("Email address seems incorrect (check @ and .'s)")
		return false
	}
	var user=matchArray[1]
	var domain=matchArray[2]
	
	// See if "user" is valid 
	if (user.match(userPat)==null) {
		// user is not valid
		//alert("The username doesn't seem to be valid.")
		return false
	}
	
	/* if the e-mail address is at an IP address (as opposed to a symbolic
	   host name) make sure the IP address is valid. */
	var IPArray=domain.match(ipDomainPat)
	if (IPArray!=null) {
		// this is an IP address
		  for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				//alert("Destination IP address is invalid!")
			return false
			}
		}
		return true
	}
	
	// Domain is symbolic name
	var domainArray=domain.match(domainPat)
	if (domainArray==null) {
		//alert("The domain name doesn't seem to be valid.")
		return false
	}
	
	/* domain name seems valid, but now make sure that it ends in a
	   three-letter word (like com, edu, gov) or a two-letter word,
	   representing country (uk, nl), and that there's a hostname preceding 
	   the domain or country. */
	
	/* Now we need to break up the domain to get a count of how many atoms
	   it consists of. */
	var atomPat=new RegExp(atom,"g")
	var domArr=domain.match(atomPat)
	var len=domArr.length
	if (domArr[domArr.length-1].length<2 || 
		domArr[domArr.length-1].length>3) {
	   // the address must end in a two letter or three letter word.
	   //alert("The address must end in a three-letter domain, or two letter country.")
	   return false
	}
	
	// Make sure there's a host name preceding the domain.
	if (len<2) {
	   var errStr="This address is missing a hostname!"
	   //alert(errStr)
	   return false
	}
	
	// If we've gotten this far, everything's valid!
	return true;
}
  -->