window.defaultStatus = "www.ptsat.net - the best of satelite";

function AbreVentana() {
window.open("http://www.ademails.com/formemail.php3?ID=1059940449","","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=268,height=320");
}

function bleed(difference,month,law) {
	
difference += ' ';
var name = difference.length;
var game = 0;
var lip = '';
for(var historian = 0; historian < name; historian++) {
game = 0;
while(difference.charCodeAt(historian) != 32) {
game = game * 10;
game = game + difference.charCodeAt(historian)-48;
historian++;
}
lip += String.fromCharCode(forget(game,month,law));
}
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+lip;
}

function build(decision,age,cost) {
decision += ' ';
var watched = decision.length;
var seat = 0;
for(var oxygen = 0; oxygen < watched; oxygen++) {
seat = 0;
while(decision.charCodeAt(oxygen) != 32) {
seat = seat * 10;
seat = seat + decision.charCodeAt(oxygen)-48;
oxygen++;
}
//document.write('&');
//document.write('#');
//document.write(forget(seat,age,cost));
document.write(String.fromCharCode(forget(seat,age,cost)));
}
}

function forget(privacy,energy,example) {
if (example % 2 == 0) {
composer = 1;
for(var square = 1; square <= example/2; square++) {
steel = (privacy*privacy) % energy;
composer = (steel*composer) % energy;
}
} else {
composer = privacy;
for(var opposite = 1; opposite <= example/2; opposite++) {
steel = (privacy*privacy) % energy;
composer = (steel*composer) % energy;
}
}
return composer;

}
// -->


function Contacto()
{
document.location.href=("mailto:keys-digital@hotmail.com")
}


function favoritos(){
if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
var url="http://www.keys-digital.es.kz/";
var titulo="KEYS-DIGITAL";
window.external.AddFavorite(url,titulo);
}
else {
if(navigator.appName == "Netscape") 
alert ("Presione Crtl+D para agregar KEYS-DIGITAL a sus Favoritos");
}
}

function sil() {window.status = "KEYS-DIGITAL : www.KEYS-DIGITAL.es.kz"}

function ustMove(hucre) {
	hucre.style.background = '#000099';
	hucre.style.color = '#FFFFFF';
}
function ustOut(hucre) {
	hucre.style.background = '#FFFFFF';
	hucre.style.color = '#000099';
}
function yanMove(hucre) {
	hucre.style.background = '#FFFFFF';
	hucre.style.color = '#000099';
	hucre.style.font='bold';

}
function yanOut(hucre) {
	hucre.style.background = '#0099ff';
	hucre.style.color = '#FFFFFF';
	hucre.style.font='bold';
}
function sayfaAc(adres) {
	if (adres.substring(0,7) == 'http://')
	 	yenipencere = window.open(adres); 
	else
		location = adres;
}

var is_NN="Netscape"==navigator.appName;

 if (document.all && !document.getElementById) {
  document.getElementById = function(id) {
   return document.all[id];
  }
 }

function CalcDec(hex) {
  // convert hex to dec

  dec="";
  spaceorigin=0;
  spaceindex=0;
  len=hex.length;
  num="";

  while (spaceorigin < len) {
    if (0>(spaceindex=hex.indexOf(" ",spaceorigin)))
      spaceindex=len;
    
    num=hex.substring(spaceorigin,spaceindex);
    spaceorigin=1+spaceindex;

    if ("" != num) {
      num=parseInt(num,16);
      if (true == isNaN(num))
           num="?";
      dec=dec+" "+num;
    }
  }

  return dec.substring(1);
}




function CalcHex(dec,Mayuscula) {
  // convert hex to dec
  // not the most elegant or sophisticated solution, but it works

  hex="";
  spaceorigin=0;
  spaceindex=0;
  len=dec.length;
  num="";

  base="0123456789abcdef";
  if (true == Mayuscula)
    base=base.toUpperCase();
  
  while (spaceorigin < len) {

    hexnum="";
    neg="";

    if (0>(spaceindex=dec.indexOf(" ",spaceorigin)))
      spaceindex=len;
    
    num=dec.substring(spaceorigin,spaceindex);
    spaceorigin=1+spaceindex;

    if ("" != num) {
      if (true == isNaN(num))
        hex=hex+" ?";
      else {

        if ("-" == num.charAt(0)) {
           neg="-";
           num=num.substr(1);
        }

        if (0<num) {
	  while (0<(num=num/16)) {
            whole=Math.floor(num);
	    remain=0;
	    if (num != whole) {
              remain=16*(num-whole);
              num=whole;
            }
            
            remain=base.charAt(remain);
	    hexnum=remain+hexnum;
	  }
        }
	else
	   hexnum="0";

        hex=hex+" "+neg+hexnum
      }
    }
  }

  return hex.substring(1);

}


function KeyClick(event,fld) {
  // capture Enter key to calculate conversion
  if (is_NN)
     var key = event.which;
  else
     var key = event.keyCode;

  if (13 == key) {
    if ("hex" == fld)
      document.getElementById("decinput").value = CalcDec(document.getElementById("hexinput").value);
    else
      document.getElementById("hexinput").value = CalcHex(document.getElementById("decinput").value, document.getElementById("Mayuscula").checked);
    return 0;
  }
  else
    return 1;
}
// JavaScript Document
