// JavaScript Document
function getRef(obj) {
      if(typeof obj == "string")
         obj= document.getElementById(obj);
      return obj;
}
function newWin(url,titul,w,h) {
	x=window.screen.availWidth;
	y=window.screen.availHeight;
	x=(x-w)/2;
	y=(y-h)/2;
	p=window.open(url,titul,"width="+w+",height="+h+",left="+x+",top="+y);
	p.focus();
}

function newWin2(url,titul,w,h) {
	x=window.screen.availWidth;
	y=window.screen.availHeight;
	x=(x-w)/2;
	y=(y-h)/2;
	p=window.open(url,titul,"width="+w+",height="+h+",left="+x+",top="+y+",scrollbars=yes,resizable=yes");
	p.focus();
}

function resalta(obj) {
	getRef(obj).className = "tdSelected";
}
function restore(obj) {
	getRef(obj).className = "";
}
function aparecer(obj){
	if(getRef(obj).className=="displayTrue")
		getRef(obj).className = "displayFalse";
	else
		getRef(obj).className = "displayTrue";
}
function limpiar(obj){
	getRef(obj).value="";
}

function randomRef(obj, str, limit){
	num=Math.floor(Math.random()*limit);
	getRef(obj).value=str+num;
}
// preload( '01.gif', '02.gif' ); 
function preload()
{ 
  var args = preload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}