   //---- variables for latest news -----
   var smsg=new Array();
   var news_head=new Array();
   var news_date=new Array();
   var news_cont=new Array();
   var iX=-1;

   //---- these are the functions called by Default ----

   var DHTML = (document.getElementById || document.all || document.layers);

   function changeCol(ob,col)
   {
	  if (!DHTML) return;
	  var x = new getObj(ob);
	  x.style.backgroundColor = col;
	  x.style.borderStyle = 'outset';
	  x.style.padding = '4px 6px 4px 6px';
   }

   function mouseDn(ob)
   {
	  if (!DHTML) return;
	  var x = new getObj(ob);
	  x.style.borderStyle = 'inset';
	  x.style.padding = '6px 6px 2px 8px';
   }

   function mouseUp(ob)
   {
	  if (!DHTML) return;
	  var x = new getObj(ob);
	  x.style.borderStyle = 'outset';
	  x.style.padding = '4px 6px 4px 6px';
   }

   function getObj(name)
   {
      if (document.getElementById) {
	      this.obj = document.getElementById(name);
	      this.style = document.getElementById(name).style;
      } else if (document.all) {
	      this.obj = document.all[name];
	      this.style = document.all[name].style;
      } else if (document.layers) {
         this.obj = document.layers[name];
 	      this.style = document.layers[name];
      }
   }

   //---- Cookie functions ----

   function createCookie(name,value,days)
   {
      if (days) {
         var date = new Date();
         date.setTime(date.getTime()+(days*24*60*60*1000));
         var expires = "; expires="+date.toGMTString();
      } else var expires = "";
	   var ck = name+"="+value+expires+"; path=/";
      //	if (days != -1) alert('Cookie\n' + ck + '\ncreated');
	   document.cookie = ck;
   }

   function readCookie(name)
   {
      var nameEQ = name + "=";
	   var ca = document.cookie.split(';');
	   for(var i=0;i<ca.length;i++) {
         var c = ca[i];
		   while (c.charAt(0)==' ') c = c.substring(1,c.length);
		   if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
      }
	   return null;
   }

   function eraseCookie(name)
   {
      createCookie(name,"",-1);
   }



   //---------- PopUp News Window -------
   var newwindow = '';

   function popitup(url)
   {
	  if (!newwindow.closed && newwindow.location)
	  {
	  	  newwindow.location.href = url;
	  }
	  else
	  {
	     newwindow=window.open(url,'name','resizable,scrollbars,status,height=480,width=600');
	     if (!newwindow.opener) newwindow.opener = self;
	  }
	  if (window.focus) {newwindow.focus()}
	  if (arguments.length==1)return false;
   }


   //---------- PopUp Contact Window -------
   var conwindow = '';

   function popconup(url,popW,popH)
   {
	  if (!conwindow.closed && conwindow.location)
	  {
	  	  conwindow.location.href = url;
	  }
	  else
	  {
	     var conL = (screen.width - popW) / 2;
	     var conT = (screen.height - popH) / 2;
        var conP = 'width='+popW+',height='+popH+',top='+conT+',left='+conL;

        conwindow=window.open(url,'coname',conP);
	     if (!conwindow.opener) conwindow.opener = self;
	  }
	  if (window.focus) {conwindow.focus()}
	  return false;
   }


   //---- these functions are called by main pages ----

   function tglLinks(times) {

      if (!DHTML) return;

      var delay=40; var t=new Array(); var dct=delay;

      for (var i=1;i<times;i++){

         var toggleLink = document.getElementById('rl'+i)

         if(toggleLink.style.display == 'none') {
            t[i]=setTimeout("document.getElementById('rl"+i+"').style.display='block'",dct)
         } else {
            t[i]=setTimeout("document.getElementById('rl"+i+"').style.display='none'",dct)
         }
         dct += delay;
      }

      var toggleSwitch = document.getElementById('toggle')

      if(toggleSwitch.innerHTML != 'Show the Links') {
         toggleSwitch.innerHTML = 'Show the Links'
         toggleSwitch.title = 'unhide the Links'
      } else {
         toggleSwitch.innerHTML = 'Hide the above Links'
         toggleSwitch.title = 'hide the above links in order to see all of the Other Links'
      }

   }

   function ShowTour(index,title) {

      if (!DHTML) return;

      var curr_tour = document.getElementById('current_tour')
      curr_tour.innerHTML = title;
      document.ptviewer.newPanoFromList(index);
   }

