
function CheckSearch(){
	if  (document.srch.text.value == "" )
		{
		alert("Please enter a value for your search.");
		return false;
		}
	else
	{
	return true;
	}					
}

ORDVAL=Math.floor (Math.random()*1000000);

  function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = clrOver;
	}
  }
  function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	}
  }
  function mClk(src) {
    if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();
    }
  }

function ChecaDato(){
if  (document.busqueda.qt.value == "" ){
	TipsBuscar();
	return false;
}else
   if (document.busqueda.qp.value == "nada" ){	
	ComboNada();
	return false;
 }else
	return true;
   	 }	

function ComboNada(){
alert('No se te olvide seleccionar en dónde deseas buscar.');
}		

function TipsBuscar(){
direccion = "http://busqueda.terra.com.mx:81/tips.htm";
window.open(direccion, 'TheRemote', 'width=520, height=480, resizable=no,left=150,top=150')}

		 
function restore() { 
  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 precarga() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=precarga.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 findObj(n, d) { 
  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=findObj(n,d.layers[i].document); return x;
}
function swpimg() { 
  var i,j=0,x,a=swpimg.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function Arreglo(){
  this.length = Arreglo.arguments.length 
  for (var i = 0; i < this.length; i++)
    this[i] = Arreglo.arguments[i]
}
function Idate() {
  var ndia  = new Arreglo('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')
  var nmes  = new Arreglo('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December')
  var ahora
  var fecha = new Date()
  var ano   = fecha.getYear()
  var mes   = fecha.getMonth()
  var dia   = fecha.getDay()
  var dian  = fecha.getDate()
  if (ano < 200)
  	{ano += 1900;}		
  ahora = ndia[dia] + " " + nmes[mes] + " " + dian + ", " + ano;
  return ahora
}

	// this script can be used for all images on a site.  But especially for 
	// image-dependent navigation.  It is passed two parameters from the onError
	// event handler in the <img> tags.  
	// for example:
	// <img src="this_image.gif" 
	//		name="bogus_image"
	//		width="100" 
	//		height="100" 
	//		onerror="image_reload ('bogus_image', 'this_image.gif')">

	// set a variable by which we can terminate reload if it continues to fail
	var k = 0		
	
	function image_reload (name, imgSrc)
	{
		tag = document.images[name];	// shortcut the original image object
		var x = tag.width;				// find out the width
		var y = tag.height;				// and height of the image which failed to load
		
		// increment the counter
		k++										


		if (k > 2)						// if it hasn't loaded after two tries, it aint gonna.  
		{					
			tag.onerror = stopLoading;	// redefine the onerror event and let people know
			
			var oops = 'The Image \'' + imgSrc + '\' has failed to load properly, if this '
			oops += 'occurs frequently please advise this site\'s webmaster.'
			
			alert (oops);
			return;
		}
		
		// until the counter gets too high, reload the image
		
		img = new Image (x, y);			// create
		img.src = imgSrc;				// and load the image again
		tag.src = img.src;				// dump the reloaded image back into it proper place

		return;
	}
	
	// if we don't set up another onerror handler, we could get stuck in a nasty recursive
	// loop as the script tries forever to reload the image.  So we create this empty handler.
	function stopLoading ()
	{		
		return;
	}

	browserName = navigator.appName;
	browserVer = parseInt(navigator.appVersion);
	        if (browserName == "Netscape" && browserVer >= 3 || browserName == "Microsoft Internet Explorer" && browserVer>=4) version = "n3";
	        else version = "x";
	
	function popupScorcher()
	{
	  win=window.open('',"scorcher","width=600,height=350,scrollbars=no,resizable=no,toolbar=no,menubar=no,location=no");
	}

function rolloverNav (eventSource) {if (navigator.appName == "Microsoft Internet Explorer") eventSource.style.backgroundColor = "#CCCCCC";}

function rolloutNav (eventSource) {if (navigator.appName == "Microsoft Internet Explorer") eventSource.style.backgroundColor = "#CCCC99";}

function OpenPopUp(url, winName, attributes){var myWindow = window.open(url, winName, attributes);}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

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_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
