function MM_findObj(n, d) { //v3.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); return x;

}



function MM_controlShockwave(objStr,x,cmdName,frameNum) { //v3.0

  var obj=MM_findObj(objStr);

  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');

}



//Define a couple of global variables.



var timerID = null

var timerRunning = false



function stopTimer(){

        //stop the clock

        if(timerRunning) {

                clearTimeout(timerID)

                timerRunning = false

        }

} 



function startTimer(){

     // Stop the clock (in case it's running), then make it go.

    stopTimer()

    runClock()

}



function runClock(){

        document.clock.face.value = timeNow()

        //Notice how setTimeout() calls its own calling function, runClock().

        timerID = setTimeout("runClock()",1000)

        timerRunning = true

}



function timeNow() {

        //Grabs the current time and formats it into hh:mm:ss am/pm format.

        now = new Date()

        hours = now.getHours()

        minutes = now.getMinutes()

        seconds = now.getSeconds()

        timeStr = "" + ((hours > 12) ? hours - 12 : hours)

        timeStr  += ((minutes < 10) ? ":0" : ":") + minutes

        timeStr  += ((seconds < 10) ? ":0" : ":") + seconds

        timeStr  += (hours >= 12) ? " PM" : " AM"

        return timeStr

}

// End of custom functions, stop hiding code -->



//Ejemplo: width=450,height=400

function ventana(theURL,winName,features) {

  w=window.open(theURL,winName,features);

}



function changeto(bcolor, fcolor){

source=event.srcElement

if (source.tagName=="TR"||source.tagName=="TABLE")

return

while(source.tagName!="TD")

source=source.parentElement

if (source.style.backgroundColor!=bcolor&&source.id!="ignore")

{

source.style.backgroundColor=bcolor;

source.style.color=fcolor;

}

}



function changeback(bcolor, fcolor){

if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")

return

if (event.toElement!=source)

{

source.style.backgroundColor=bcolor};

source.style.color=fcolor;

}



        

   var bannerAD=new Array();

   var bannerADlink=new Array();

   var adNum=0;



   bannerAD[0]="img/banner/hgs2.jpg";
   bannerADlink[0]="http://www.hgssa.com";



   var preloadedimages=new Array();

   for (i=1;i<bannerAD.length;i++){

      preloadedimages[i]=new Image();

      preloadedimages[i].src=bannerAD[i];

   }



function setTransition(){

   if (document.all){

      bannerADrotator.filters.revealTrans.Transition=Math.floor(Math.random()*23);

      bannerADrotator.filters.revealTrans.apply();

   }

}



function playTransition(){

   if (document.all)

      bannerADrotator.filters.revealTrans.play()

}



function nextAd(){

   if(adNum<bannerAD.length-1)adNum++ ;

      else adNum=0;

   setTransition();

   document.images.bannerADrotator.src=bannerAD[adNum];

   playTransition();

   theTimer=setTimeout("nextAd()", 5000);

}



function jump2url(){

   jumpUrl=bannerADlink[adNum];

   jumpTarget='_blank';

   if (jumpUrl != ''){

      if (jumpTarget != '')window.open(jumpUrl,jumpTarget);

      else location.href=jumpUrl;

   }

}

function displayStatusMsg() { 

   status=bannerADlink[adNum];

   document.returnValue = true;

}




