var elInicio=new Date();
var antes=elInicio.getTime();
function tiempo(){
var elFinal=new Date();
var despues=elFinal.getTime();
var diferencia=despues-antes;
var presegundos=diferencia/1000;
var segundos=Math.round(presegundos*100)/100;
var total="Listo: "+segundos+" segundos.";
MM_setTextOfLayer('crono','',total);
}

function pviiW3Cbg(obj, pviiColor) { //v1.1 by Project VII
	obj.style.backgroundColor=pviiColor
}
function separar(){
	for (i=0;i<5;i++){
    	document.busquedas.elements[i].value="xzx";
	}
	cadenaprevia=document.busquedas.texto.value;
	cadenamatriz=cadenaprevia.split(' ');
	for (i=0;i<=cadenamatriz.length;i++){
		if(i<5){
			if(cadenamatriz[i]){
				document.busquedas.elements[i].value=cadenamatriz[i];
			}
		}
	}
document.busquedas.texto.value='';
if (document.busquedas.direccion[document.busquedas.direccion.selectedIndex].value==""){
alert ("Selecciona entre:\n -logs(Historial)\n -Articulos y Tutoriales");
return false
}else{
document.busquedas.action=document.busquedas.direccion[document.busquedas.direccion.selectedIndex].value;
return true
}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function Submitform()
			{
		

			if  (document.sub.addr.value=='') alert("Direccion de correo incorrecta");
			else 
				{
				if ( ((document.sub.addr.value.indexOf('@',1))==-1)||(document.sub.addr.value.indexOf('.',1))==-1 )
				      alert("Direccion de correo incorrecta");
      				 
				else 	document.sub.submit();
			 	}
			
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function isViewletCompliant()
{
     answer=true;
     version=Math.round(parseFloat(navigator.appVersion) * 1000);
     if (navigator.appName.substring(0,9) == "Microsoft")
     {
          //IE4.0+. Ok on all platforms
          if(version<4000) answer=false;
     }
     if (navigator.appName.substring(0,8) == "Netscape")
     {
          //NN5.0+ needed on mac, NN4.06+ on other platforms
          if ((navigator.appVersion.indexOf("Mac")> 0) && (version<5000))
          answer=false;
          else
          if (version<4060)
               answer=false;
     }
     // Browser Shouldn't support java 1.1 but might have plugin
     plugins=navigator.plugins;
     if (answer==false && plugins!=null)
     {
          for(i=0;i!=plugins.length;i++)
          if((plugins[i].name.indexOf("Java Plug-in")>=0) && (plugins[i].name.indexOf("1.0")<0))
               answer=true;
     }
     return answer;
     //For other browsers we assume it works}function openViewlet(htmlFile,htmlWidth,htmlHeight)
     {
          str = 'resizable=0,toolbar=0,menubar=0,';
          str = str + 'scrollbars=0,status=0,location=0,directory=0,width=350,height=200';
          if(!isViewletCompliant())
          {
               open("http://www.qarbon.com/warning/index.html",'Leelou',str);
          }
          else
          {
               window.open(htmlFile,'Leelou','width='+htmlWidth+',height='+htmlHeight+',top=10,left=20');
          }
     }
}

function openViewlet(htmlFile,htmlWidth,htmlHeight)
{
     str = 'resizable=0,toolbar=0,menubar=0,';
     str = str + 'scrollbars=0,status=0,location=0,directory=0,width=350,height=200';
     if(!isViewletCompliant())
     {
          open("http://www.qarbon.com/warning/index.html",'Leelou',str);
     }
     else
     {
          window.open(htmlFile,'Leelou','width='+htmlWidth+',height='+htmlHeight+',top=10,left=20');
     }
}

function tcn_setCookie (name, outputValue, days, evalValue) {
  //Original code:(C) 1998 www.webmonkey.com
  //Modifications: 2001 Tecnorama
  var myValue= outputValue;
  if(evalValue == 1){
    myValue = eval(myValue + '.value');
 }
  var myDay = new Date();
  myDay.setDate(myDay.getDate() + days);
  document.cookie = name + '=' + myValue + ((days)?(';expires=' + myDay.toGMTString()):'');
}

function tcn_killCookie(name) {
  //Original code:(C) 1998 www.webmonkey.com
  //Modifications: 2001 Tecnorama
  var firstChar, lastChar, theValue;
  var theBigCookie = document.cookie;
  firstChar = theBigCookie.indexOf(name);
  if(firstChar != -1) {
    firstChar += name.length + 1;
    lastChar = theBigCookie.indexOf(';', firstChar);
    if(lastChar == -1) lastChar = theBigCookie.length;
    theValue = theBigCookie.substring(firstChar, lastChar);
  } else {
   theValue = false;
  }
  if(theValue) {
    document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT';
  }
}

function tcn_readCookie(name, outputElement, defaultText) {
    //Original code:(C) 1998 www.webmonkey.com
  //Modifications: 2001 Tecnorama
  if(document.cookie==''){
    var actualValue;
    actualValue=defaultText;
  }
  if(document.cookie != '') {
    var actualValue, firstChar, lastChar;
    var theBigCookie = document.cookie;
    firstChar = theBigCookie.indexOf(name);
    if(firstChar != -1) {
      firstChar += name.length + 1;
      lastChar = theBigCookie.indexOf(';', firstChar);
      if(lastChar == -1) lastChar = theBigCookie.length;
      actualValue = theBigCookie.substring(firstChar, lastChar);
    } 
  }
  if(outputElement && actualValue) {
    eval(outputElement+".value = '"+actualValue+"'");
  }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
   }
}
function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

function jm_translatepage(newwin, langpair)
{
if (!newwin) {
location.href = "http://world.altavista.com/tr?lp="+ langpair +"&url=" + location.href;
} else {
window.open("http://world.altavista.com/tr?lp="+ langpair +"&url=" + location.href, "translatewin","");
}
}
   function panel() { 
      if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) 
      { 
         window.sidebar.addPanel ("MM DesDev", 
         "http://www.tecnorama.org/newsfeeder.php",""); 
      } 
}
function dondeBuscar(){
if (document.busquedas.direccion[document.busquedas.direccion.selectedIndex].value==""){
alert ("Selecciona entre:\n -logs(Historial)\n -Articulos y Tutoriales");
return false
}else{
document.busquedas.action=document.busquedas.direccion[document.busquedas.direccion.selectedIndex].value;
return true
}
}
