<!--




//    TO OPEN FULL-SIZE IMAGE FROM SLIDESHOW THUMBNAILS.........
function link_to_big_image(the_image)
       {
       //alert(getRefToDiv(the_image).src)
       //str=getRefToDiv(the_image).src;


      full_string_to_big=getRefToDiv(the_image).src;
      //full_ref_to_big=full_string_to_big.substring(0,full_string_to_big.lastIndexOf('_')) + full_string_to_big.substring(full_string_to_big.lastIndexOf('.'),full_string_to_big.length);
      //alert(full_ref);
     if(!(full_string_to_big.indexOf('_thumb')>=0))
         {
      full_ref_to_big=full_string_to_big;
         }
     else if((full_string_to_big.indexOf('_thumb')>=0))
         {
//  IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    
//  IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    
//  IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    
//  IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    
//  IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT    IMPORTANT  
//  USE NEXT LINE IF .THUMB (THUMBNAILS ARE TO BE USED)........
    // STRIP THE THUMBNAIL OF ITS "_thumb" (e.g. pearl_thumb.jpg)
      full_ref_to_big=full_string_to_big.substring(0,full_string_to_big.lastIndexOf('_')) + full_string_to_big.substring(full_string_to_big.lastIndexOf('.'),full_string_to_big.length);           
         }

       alt_name=full_ref_to_big.replace(/-{4}/g,'? ');
       alt_name=alt_name.replace(/-{3}/g,'! ');
       alt_name=alt_name.replace(/-{2}/g,'\'');
       alt_name=alt_name.replace(/-/g,' ');
       alt_name=alt_name.replace(/_{2}/g,'. ');
       alt_name=alt_name.replace(/_/g,', ');
//  IMPORTANT   IMPORTANT   IMPORTANT   IMPORTANT   IMPORTANT   
//  IMPORTANT   IMPORTANT   IMPORTANT   IMPORTANT   IMPORTANT   
//  IMPORTANT   IMPORTANT   IMPORTANT   IMPORTANT   IMPORTANT   
//  USE NEXT LINE IF A CAPTION IS NOT DESIRED.........
       if((js_safe_more_info.indexOf('nocaptions')>=0))
         {
          alt_name="";
         }

       //alert(alt_name);
       theleft = alt_name.lastIndexOf("/") + 1;
       theright = (alt_name.length-4);
       alt_name=alt_name.substring(theleft, theright);
       //alert("theleft: " + theleft + " | theright: " + theright);
       //alert(full_string_to_big.substring(0,30));
       //NewWindow(mypage,myname,w,h,scroll,alt_name)
       NewWindow(full_ref_to_big,'Picture Index','','','yes',alt_name);
               
       }




//  Function to Pop-Up new window and hold focus

function NewWindow(mypage,myname,w,h,scroll,alt_name){
//alert(mypage + " | " + alt_name);
//alert('to here');
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
//target="Picture_Index"
win = window.open('','myname','settings')   // (mypage,myname,settings)
win.document.write("<TITLE>" + alt_name + "</TITLE>")
win.document.write("<BODY style='font-size:100%;background: url(bgimage.jpg)'>")
win.document.write("<p align=center><img src='" + mypage + "' alt='" + alt_name + "' border=3 align=center style='display:block;'></img></p><br>")
win.document.write("<p align=center style='font-family:Comic Sans MS,Arial,Verdana; font-size:12pt'>" + alt_name + "</p>")
win.document.write("</BODY>")
win.document.write("</HTML>")
win.document.close()
//self.name="main"

win.focus()
	if (!this.ontop)
                       {
		win.focus();
                       }
//return false;
}




//  Function to Pop-Up new window and hold focus

function NewURLWindow(mypage,myname,w,h,scroll,alt_name){
//alert(mypage + " | " + alt_name);
//alert('to here');
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
//target="Picture_Index"
//alert(settings);
win = window.open(mypage,myname,settings)   // (mypage,myname,settings)


win.focus()
	if (!this.ontop)
                       {
		win.focus();
                       }
//return false;
}



//  Function to Pop-Up new window and hold focus

function NewURLWindowWMenu(mypage,myname,w,h,scroll,menu,alt_name){
//alert(mypage + " | " + alt_name);
//alert('to here');
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',menubar='+menu+',resizable'
//target="Picture_Index"
//alert(settings);
win = window.open(mypage,myname,settings)   // (mypage,myname,settings)


win.focus()
	if (!this.ontop)
                       {
		win.focus();
                       }
//return false;
}







function scooch_slideshow()
   {
       move_obj('main_table',findPosX(main_table)+1,0);
       move_obj('main_table',findPosX(main_table)-1,0);
   }


//  BELOW TAKEN FROM THIS WEBSITE
//http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=14&TOshow=MOZ

function getRefToDiv(divID,oDoc) {

//    http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=14

    if( !oDoc ) { oDoc = document; }
    if( document.layers ) {
        if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
            //repeatedly run through all child layers
            for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
                //on success, return that layer, else return nothing
                y = getRefToDiv(divID,oDoc.layers[x].document); }
            return y; } }
    if( document.getElementById ) {
        return document.getElementById(divID); }
    if( document.all ) {
        return document.all[divID]; }
    return false;
}





function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}


function place_circle_page2()
{
       
            //alert((getElementWidth('trouble_table')>0) + " | " + (getElementWidth('trouble_table2')>0) + " | " + (getElementWidth('main_table')>0));

       //alert(getElementWidth('trouble_table') + " | " + getElementWidth('trouble_table2') + " | " + getElementWidth('main_table'));

        var ie5=document.all && !window.opera;
        var window_size=ie5? iecompattest().clientWidth : window.innerWidth-20;
        //alert(window_size);
        if(window_size>getElementWidth('main_table'))
           {  
                
                  if(getElementWidth('main_table')>0)
                        {
                              // NEED THIS NEXT LINE TO CENTER THE MEGA TABLE....            
            move_obj('main_table',window_size/2-getElementWidth('main_table')/2,0);
                         }  
   
         }
        else
           {
              move_obj('main_table',15,0);
           }


                  if(getElementWidth('trouble_table2')>0)
                        {
        // %%%% NEED THESE TWO TO MAINTAIN COLUMN LENGTH IN CONTENT TABLE....
        resize_obj('trouble_table',getElementWidth('trouble_table'),getElementHeight('help_table'))
        resize_obj('trouble_table2',getElementWidth('trouble_table2'),getElementHeight('help_table'))
        resize_obj('trouble_table_atable',getElementWidth('trouble_table_atable'),getElementHeight('help_table'))
        resize_obj('trouble_table2_atable',getElementWidth('trouble_table2_atable'),getElementHeight('help_table'))
                        }
 
       //alert("here....");
       move_obj('main_table',findPosX(main_table)+1,0);
       move_obj('main_table',findPosX(main_table)-1,0);

        resize_obj('trouble_table_atable',getElementWidth('trouble_table_atable'),getElementHeight('help_table'))
        resize_obj('trouble_table2_atable',getElementWidth('trouble_table2_atable'),getElementHeight('help_table'))

}












//  BEGINNING OF LOADING MESSAGE TO LET USER KNOW THAT
//  THE SEARCH IS LOADING

loading2_filler=new Array("Loading Your Search<br>&nbsp;&nbsp;&nbsp;&nbsp;",
                          "Loading Your Search<br>.&nbsp;&nbsp;&nbsp;",
                          "Loading Your Search<br>..&nbsp;&nbsp;",
                          "Loading Your Search<br>...&nbsp;",
                          "Loading Your Search<br>....");

first_time_boolean=true;
loading_incr=0
function loading_timeout()
   {
        var ie5=document.all && !window.opera;
        var window_width=ie5? iecompattest().clientWidth : window.innerWidth-20;
        var window_height=ie5? iecompattest().clientHeight : window.innerHeight-20;
        //alert(window_size);
        if(window_width>getElementWidth('loading2'))
           {  
                
                  if(getElementWidth('loading2')>0)
                        {
                              // NEED THIS NEXT LINE TO CENTER THE MEGA TABLE....            
            move_obj('loading2',window_width/2-getElementWidth('loading2')/2,
                        window_height/2-getElementHeight('loading2')/2);
                         }  
                
                  if(getElementWidth('DivShim')>0)
                        {
                              // NEED THIS NEXT LINE TO CENTER THE MEGA TABLE....            
            move_obj('DivShim',window_width/2-getElementWidth('DivShim')/2,
                        window_height/2-getElementHeight('DivShim')/2);
                         }   
   
         }

      if(first_time_boolean==true)
        {     
           getRefToDiv('loading2').style.visibility='visible';
           getRefToDiv('DivShim').style.visibility='visible';
           first_time_boolean=false;
        }
      the_string=loading2_filler[loading_incr];
      //alert(the_string)
      getRefToDiv('loading3').innerHTML=the_string;
      loading_incr=(loading_incr==4)?0:loading_incr+1;
      setTimeout("loading_timeout();",150);
   }







//  NEXT FUNCTION  - ID WHICH KEY HAS BEEN PRESSED....
function showKey(e) {
  var key, shift, ctrl, mod;
  //if (is.gecko || is.opera) {
  //  key = e.which;
  //  shift = e.shiftKey;
  //  ctrl = e.ctrlKey;
 //}

      // NEXT LINES TAKEN FROM QUIRKSMODE.ORG......
      // ALTERNATIVE TO BROWSER-SNIFFING
	//%%%%%%%if (!e) var e = window.event;
	// e gives access to the event in all browsers
	// 'this' now definitely refers to the HTML element which currently handles the event
	// target/srcElement refer to the HTML element the event originally took place on
      //  STOP BUBBLING.......
	//%%%%%%%e.cancelBubble = true;
	//%%%%%%%if (e.stopPropagation) e.stopPropagation();
      // NEXT LINES SIMILAR TO BELOW CODE....
	//%%%%%%%if (e.keyCode) code = e.keyCode;
	//%%%%%%%else if (e.which) code = e.which;

  if (ns6) 
   {
    key = e.which;
    mod = parseInt(e.modifiers);
    shift = (mod & 4)==4;
    ctrl = (mod & 2)==2;
   }
  else if (window.event) 
   {
    key = window.event.keyCode;
    shift = window.event.shiftKey;
    ctrl = window.event.ctrlKey;
   }
//  IMPORTANT:: KEY NUMBERS ARE NOT THE SAME FOR NETSCAPE AND IE!!!!
//  INSTEAD USE ONCLICK TO DETECT A "CLICK" ON A LINK
                   if(key==1 && key!=null)
                      {
                         //alert(keyCode)
                         loading_timeout();
                      }

  //window.status =
    alert("Key=" + key + "  Shift=" + (shift ? 'true' : 'false') + "  Ctrl=" + (ctrl ? 'true' : 'false') + "")
  return true;
}
//  ABOVE FUNCTION - ID WHICH KEY HAS BEEN PRESSED....

//select_type_submit();

/*
                    '<div id="loading2" name="loading2"' +
                    'border=2 bordercolor=black style="position:absolute;' +
                    'top:300px;left:300px;height:100px;width:200px;' +
                    'z-index:6;visibility:visible;' +
                    'background:white;" onmouseup="showKey(event)"' +
                    '">' +
*/

function hide_loading()
      {
         getRefToDiv('loading2').style.visibility="hidden";
         getRefToDiv('DivShim').style.visibility="hidden";
      }

          iframe_shim='<iframe id="DivShim" src="" scrolling="no"' +
                      'frameborder="0"  style="visibility:hidden;' +
                      'width:250px;height:100px;position:absolute; ' +
                      'background-color:#ffce00; top:300px; left:300px;' +
                      'z-index:4;"></iframe>';

           document.write(iframe_shim);

           loading2='<table id="loading2" name="loading2"' +
                    'border=2 bordercolor=blue style="background:red;' +
                    'height:100px;width:250px;visibility:hidden;' +
                    'background:white;z-index:6;padding:0px;' +
                    'position:absolute;top:300px;left:300px;' +
                    '"><tr><td width=240px align=right ' +
                    'style="background:blue;height:10px"' +
                    '></td><td onClick="hide_loading();"' +
                    'style="background:red;height:10px;width:10px;color:white;"><a ' +
                    'style="font-color:white;font-size:18px;font-face:ms comic sans,arial">' +
                    '<b>X</b></a>' +
                    '</td></tr>' + 
                    '<tr><td height=95px colspan=2 align=center valign=middle' +
                    'style="background:white;">' +
                    '<div id="loading3" name="loading3"' +
                    'valign=middle style=" ' +
                    'padding:0px;' +
                    'align:middle;text-align:center' +
                    'border:0px solid black;background:;' +
                    'font-size:18px;font-family:comic sans ms;">' +
                    'Loading Your Search<br>&nbsp;&nbsp;&nbsp;&nbsp;</div>' +
                    '</td></tr></table>';

           document.write(loading2);

           //loading_timeout();












//Dynamic countdown Script II- © Dynamic Drive (www.dynamicdrive.com)
//Support for hour minutes and seconds added by Chuck Winrich (winrich@babson.edu) on 12-12-2001
//For full source code, 100's more DHTML scripts, visit http://www.dynamicdrive.com

function setcountdown(theyear,themonth,theday,thehour,themin,thesec){
yr=theyear;mo=themonth;da=theday;hr=thehour;min=themin;sec=thesec
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 1: Configure the countdown-to date, in the format year, month, day, hour(0=midnight,23=11pm), minutes, seconds:
setcountdown(2006,03,12,16,30,00)

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectivelySelection Sunday Celebration at Calhoun's on the iver.'
var occasion="Selection Sunday Celebration<br>at<br>Calhoun’s on The River!!!<br><br><b>Sunday, March 12th,<br>from 4:30 to 7:30</b><br><br><a href='http://www.coppercellar.com/cal/index.htm' target='_blank'><img src='calhouns.gif' height=100px border=0></img></a>"
var message_on_occasion="Selection Sunday Celebration<br>at<br>Calhoun’s on The River!!!<br><br><b>Sunday, March 12th,<br>from 4:30 to 7:30</b><br><br><a href='http://www.coppercellar.com/cal/index.htm' target='_blank'><img src='calhouns.gif' height=100px border=0></img></a>"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='300px'
var countdownheight='150px'
var countdownbgcolor='light yellow'
var opentags='<font face="Verdana" color="#000000"><small>'
var closetags='</small></font>'

//////////DO NOT EDIT PAST THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){
if (document.layers)
document.countdownnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
countdown()
}

//window.onload=start_countdown
//start_countdown;


function countdown(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr+" "+hr+":"+min+":"+sec
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
//if on day of occasion
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+message_on_occasion+closetags
return
}
//if passed day of occasion
else if (dday<=-1){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
return
}
//else, if not yet
else{
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours,<br>"+dmin+" minutes, and "+dsec+" seconds<br>left until<br>"+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML="<br>" + opentags + "<b>" + dday + " days, "+dhour+" hours,<br>"+dmin+" minutes, and "+dsec+" seconds</b><br>left until<br>"+occasion+closetags
}
setTimeout("countdown()",1000)
}












xplace_menu_right_count=0;

function xplace_menu_right(event_id,content)
  {
 
//   My function

park_content=content;
//park_event_id=event_id;
//alert(event_id + " | " + park_content);

    clearhidemenu()

    //replace_contents('popmenu','');
    replace_contents('popmenu',content)

    //start_to_show=setTimeout("replace_contents('popmenu',park_content)",10);
         
        td_get=getRefToDiv(event_id); //window.event.srcElement.parentNode.id)
        //resize_obj('popmenu',100);
        
        //alert('To here...');
        //2_menulist
        //menu_list_table
        //popup_left=findPosX(td_left_col_divider)-getElementWidth(event_id);
        //popup_top=findPosY(main_table)
        popup_left=findPosX(td_get) + getElementWidth(event_id);
        popup_top=findPosY(td_get);  //+getElementHeight(event_id);
        //alert(popup_left + " | " + popup_top);
        move_obj('popmenu',popup_left,popup_top);

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

menuobj.thestyle.visibility="visible"    
//return false;


  }






place_menu_right_count=0;

function place_menu_right(event_id,content)
  {
 
//   My function

       clearhidemenu()
         
        td_get=getRefToDiv(event_id); //window.event.srcElement.parentNode.id)
        //resize_obj('popmenu',100);
        
        //alert('To here...');
        //2_menulist
        //menu_list_table
        //popup_left=findPosX(td_left_col_divider)-getElementWidth(event_id);
        //popup_top=findPosY(main_table)
        popup_left=findPosX(td_get) + getElementWidth(event_id);
        popup_top=findPosY(td_get);  //+getElementHeight(event_id);
        //alert(popup_left + " | " + popup_top);
        move_obj('popmenu',popup_left,popup_top);

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

menuobj.thestyle.visibility="visible"    
return false;

park_content=content;
park_event_id=event_id;

     // setTimeout("replace_contents('popmenu',park_content);",250);

  }



place_menu_right_count=0;

function atwork_place_menu_right(event_id,content)
  {
 
//   My function

       clearhidemenu()
         
        td_get=getRefToDiv(event_id); //window.event.srcElement.parentNode.id)
        //resize_obj('popmenu',100);
        
        //alert('To here...');
        //2_menulist
        //menu_list_table
        //popup_left=findPosX(td_left_col_divider)-getElementWidth(event_id);
        //popup_top=findPosY(main_table)
        popup_left=findPosX(td_get) + getElementWidth(event_id);
        popup_top=findPosY(td_get);  //+getElementHeight(event_id);
        //alert(popup_left + " | " + popup_top);
        move_obj('popmenu',popup_left,popup_top);

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj


//%%%%%%%%%%%%menuobj.thestyle.visibility="visible"    
//return false;

park_content=content;
//alert(park_content);
park_event_id=event_id;

        replace_to=setTimeout("replace_contents('popmenu',park_content);",00);
        show_to=setTimeout("show_popup();",260);
  }


var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

if (ie4||ns6)
//document.onclick=hidemenu

function hidemenu(){
if (window.menuobj)
 {
   menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
 }
//place_circle();
}

function delayhidemenu(){
//if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",900);
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
if (window.replace_to)
clearTimeout(replace_to)
if (window.show_to)
clearTimeout(show_to)
}

function show_popup()
  {

menuobj=ie4? document.all.popmenu : ns6?     document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

menuobj.thestyle.visibility="visible"    
//return false;

   }


function clear_popup_timeout(){
if (window.replace_to)
clearTimeout(replace_to)
if (window.show_to)
clearTimeout(show_to)
}















function rotate_ad_1()
   {

full_source_name=getRefToDiv("ad_1_img").src
source_name=full_source_name.substring(full_source_name.lastIndexOf("/")+1,full_source_name.length);
      
      //alert(source_name + " | " + (source_name=="american_patriot50.gif"));   

      if(source_name=="american_patriot50.gif")
         {
            getRefToDiv("ad_1_img").src="apg_cabin.jpg";
            replace_contents("ad_1_text","Call us for your next Smoky Mountain getaway!<br><b>800-204-5169</b>");
          }
      else
          {
            getRefToDiv("ad_1_img").src="american_patriot50.gif";
            replace_contents("ad_1_text","Official Sponsor of Web Streaming");
          }
 
      setTimeout("rotate_ad_1();",4000);

   } 


    //  setTimeout("rotate_ad_1();",3000);





/*          */
function stretch_letters()
   {
       if(getRefToDiv('blog_title_td'))
        {
            var ns4_letters=document.layers
            lettersobj=getRefToDiv('blog_title_td');
            lettersobj.thestyle=ns4_letters? lettersobj: lettersobj.style;

            //alert(getRefToDiv('blog_title_td').style.letterSpacing);

            with (lettersobj.thestyle)
                {
                     if(letterSpacing=="normal")
                        {
                           letterSpacing="12px";
                         }
                    else if(letterSpacing=="12px")
                        {
                            letterSpacing="-9px";
                         }                
                    else if(letterSpacing=="-9px")
                        {
                            letterSpacing="-6px";
                         }
                    else if(letterSpacing=="-6px")
                         {
                            letterSpacing="4px";
                         }
                    else if (letterSpacing=="4px")
                         {
                            letterSpacing="9px";
                         }
                    else if (letterSpacing=="9px")
                         {
                            letterSpacing="normal";
                         }

                    if(letterSpacing=="normal")
                         {
                            clearTimeout(the_timer);
                            the_timer=setTimeout('stretch_letters();',5500);
                          }
                    else
                         {
                             the_timer=setTimeout('stretch_letters();',200); 
                          }
                 }   //   close with(lettersobj.thestyle)            

            }  //  close  if(getRefToDiv('blog_title_td')


       if(getRefToDiv('blog_title_td_x'))
        {
            var ns4_letters=document.layers
            lettersobj=getRefToDiv('blog_title_td_x');
            lettersobj.thestyle=ns4_letters? lettersobj: lettersobj.style;

            //alert(getRefToDiv('blog_title_td').style.letterSpacing);

            with (lettersobj.thestyle)
                {
                     if(letterSpacing=="normal")
                        {
                           letterSpacing="5px";
                         }
                    else if(letterSpacing=="5px")
                        {
                            letterSpacing="-9px";
                         }                
                    else if(letterSpacing=="-9px")
                        {
                            letterSpacing="-6px";
                         }
                    else if(letterSpacing=="-6px")
                         {
                            letterSpacing="2px";
                         }
                    else if (letterSpacing=="2px")
                         {
                            letterSpacing="4px";
                         }
                    else if (letterSpacing=="4px")
                         {
                            letterSpacing="normal";
                         }

                    if(letterSpacing=="normal")
                         {
                            clearTimeout(the_timer);
                            the_timer=setTimeout('stretch_letters();',5500);
                          }
                    else
                         {
                             the_timer=setTimeout('stretch_letters();',200); 
                          }
                 }   //   close with(lettersobj.thestyle)            

            }  //  close  if(getRefToDiv('blog_title_td_x')

    }













//     BEGINNING OF TOP ROUTINES...........




function replace_contents(this_obj_as_string,new_content_replace)
   {
//   http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=14
     
     //show_image_bool=false;

     //get a reference as above ...
     myReference = getRefToDiv(this_obj_as_string);
     //alert(myReference)

     if(!myReference) 
        {
           //window.alert('Nothing works in this browser');
           return false; //don't go any further
           //return anything would work,
           //but I am using false to show failure
        }


       if( typeof( myReference.innerHTML ) != 'undefined' )
          {
          //used by the IE series, Konqueror, Opera 7+ and Gecko browsers
          //alert(new_content_replace)
          //myReference.innerHTML="xxxxx xxxxxx xxxx"

          myReference.innerHTML = new_content_replace;
          } 
       else
          {
                  if( myReference.document && myReference.document != window.document )  
                        {
                           //used by layers browsers
                           myReference.document.open();
                           myReference.document.write(new_content_replace);
                           myReference.document.close();
                        } 
                  else 
                        {
                            if( window.frames && window.frames.length && window.frames['nameOfIframe']) 
                               {
                                 //used by browsers like Opera 6-
                                 //if we attempt to rewrite the iframe content before
                                 //it has loaded we will only produce errors
                                 myReference = window.frames['nameOfIframe'].window;
                                 myReference.document.open();
                                 myReference.document.write('new_content_replace');
                                 myReference.document.close();
                               }
                        }
          }

        //%%%%%%%%%%%place_circle();

        //setTimeout('place_circle();',300);
    }   //  close function replace_contents()





function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}





function place_circle()
{
       //alert("To here in place_circle.....");
        var ie5=document.all && !window.opera;
        var window_size=ie5? iecompattest().clientWidth : window.innerWidth-20;
        //alert(window_size);
        if(window_size>getElementWidth('mega_table'))
           {  
         // NEED THIS NEXT LINE TO CENTER THE MEGA TABLE....            
            move_obj('mega_table',window_size/2-getElementWidth('mega_table')/2,0);
           }
        else
           {
              move_obj('mega_table',15,0);
           }
 
        //alert("here")
        get_menu=getRefToDiv('menu_list_table');



        get_top_pixels= 0 + findPosY(top_banner_td) +  getImageHeight('top_banner_td') //findPosY(main_table)   //findPosY(main_table)   //getRefToDiv('main_div').offsetTop
        get_left_pixels=findPosX(mega_table)   //(main_table)   //getRefToDiv('main_table').offsetLeft

        get_menu_top=get_top_pixels
        get_menu_left=(get_left_pixels + (getElementWidth('main_table')/2)-(getElementWidth('menu_table_td')/2))  
        get_menu_left=get_left_pixels + getElementWidth('td_left_col_divider');


        //  USE NEXT LINES IF A HORIZONTAL MENU BACKGROUND IS USED........
        //%%%%%%%%%%move_obj('navbar_3d',get_menu_left,get_menu_top)
        //resize_obj('navbar_3d_image',100,100)        //%%%%%%%%%%resize_obj('navbar_3d_image',(getElementWidth('mega_table')-                  getElementWidth('td_right_col_divider')),getElementHeight('menu_table_td'))
   

        // %%%% NEED THESE TWO TO MAINTAIN COLUMN LENGTH IN CONTENT TABLE....
        resize_obj('trouble_table',getElementWidth('trouble_table'),getElementHeight('help_table'))
        resize_obj('trouble_table2',getElementWidth('trouble_table2'),getElementHeight('help_table'))
                                
                                                                                                                                                                                                                     //content_table_td              //main table
second_dump_height=Math.max(getElementHeight('more_trouble'),getElementHeight('content_table_td'));
                 //padding_td_left_menu
//resize_obj('padding_table',getElementWidth('padding_table'),second_dump_height);
                                                                          //padding_td_left_menu
resize_obj('padding_td_left_menu',getElementWidth('padding_table'),second_dump_height);
//alert(second_dump_height + " | " + getElementHeight('padding_table'));


                               //getElementHeight('menu_list_table')
                               //getElementHeight('td_ad_main_table')
        dump_height= getElementHeight('top_banner_td') + 
                      getElementHeight('menu_table_td') + 
                         Math.max(getElementHeight('more_trouble'),getElementHeight('main_table')) +  15;
                         //getElementHeight('bottom_solid_td')
                         //getElementHeight('bottom_counter_td');
        //resize_obj('left_col_divider_table',getElementWidth('td_left_col_divider'),0);
        
resize_obj('td_left_col_divider',getElementWidth('td_left_col_divider'),dump_height);
resize_obj('td_right_col_divider',getElementWidth('td_right_col_divider'),dump_height);

       

                 //with(get_image.style)
                 //   {
                 //        //zIndex=11
                         //alert(get_image.style.zIndex)
                 //   }
 
        move_obj('mega_table',findPosX(mega_table)+1,0);
        move_obj('mega_table',findPosX(mega_table)-1,0);


}   //  close Function












function place_menu(event_id,content)
  {
 
//   My function
         
       clearhidemenu()

        td_get=getRefToDiv(event_id); //window.event.srcElement.parentNode.id)
        //resize_obj('popmenu',100);
   
        //2_menulist
        //menu_list_table
        popup_left=findPosX(td_get);
        popup_top=findPosY(td_get)+getElementHeight(event_id);
        //alert(popup_left + " | " + popup_top);
        move_obj('popmenu',popup_left,popup_top);

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

menuobj.thestyle.visibility="visible"    
return false;

  }







function findPosX(obj)
{

//     http://www.quirksmode.org/js/findpos.html

	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
//     http://www.quirksmode.org/js/findpos.html
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

var this_incr=0

function move_obj(divID_as_a_string , new_left, new_top)
   {

//   http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=14

var noPx = document.childNodes ? 'px' : 0;

    //get a reference as above ...
    myReference = getRefToDiv(divID_as_a_string);
    if( !myReference ) 
      {
        //window.alert('Nothing works in this browser');
        return false; //don't go any further
        //return anything would work,
        //but I am using false to show failure
      }
    
//now we have a reference to it

if( myReference.style ) { myReference = myReference.style; }
/*
did you see what I did there?
myReference will now always be able to reference the style,
no matter what syntax was required
NOTE, you couldn't have done that for showing/hiding
because we needed to assign different values depending
on the response to the last 'if' statement
*/
myReference.left = new_left + noPx; //( parseInt(myReference.left) + 10 ) + noPx;
//I need to parseInt because it will not be a number,
//it will look like '10px'. parseInt converts it to 10
myReference.top = new_top + noPx;     //( parseInt(myReference.top) + 20 ) + noPx;
//The div will now be at coords - top: 30px; left: 20 px;

  //this_incr+=5

   }


function resize_obj(divID_as_a_string,newWidth,newHeight)
   {

    //get a reference as above ...
    myReference = getRefToDiv(divID_as_a_string);
    if( !myReference ) 
      {
        //window.alert('Nothing works in this browser');
        return true;  // WALTON 20091030...
        //return false; //don't go any further
        //return anything would work,
        //but I am using false to show failure
      }
    //now we have a reference to it
           var noPx = document.childNodes ? 'px' : 0;
           if( myReference.style ) { myReference = myReference.style; }
           if( myReference.resizeTo ) 
              {
                 myReference.resizeTo( newWidth, newHeight ); 
              }
           myReference.width = newWidth + noPx; myReference.pixelWidth = newWidth;
           myReference.height = newHeight + noPx; myReference.pixelHeight = newHeight;

    }





function getImageWidth(myImage) {
	var x, obj;
	if (document.layers) {
		var img = findImage(name, document);  //getImage(myImage);
		return img.width;
	} else {
		return getElementWidth(myImage);
	}
	return -1;
}

function getImageHeight(myImage) {
	var y, obj;
	if (document.layers) {
                //alert("to here does this layer!!!")
		var img = findImage(name, document);  //getImage(myImage);
		return img.height;
	} else {
                //alert(getRefToDiv(myImage))
		return getElementHeight(myImage);
	}
	return -1;
}

// from http://www.aspandjavascript.co.uk/javascript/javascript%5Fapi/get_element_width_height.asp

function getElementHeight(Elem) {
	if (ns4) {
		var elem = getRefToDiv(Elem);    //getObjNN4(document, Elem);
		return elem.clip.height;
	} else {
		if(document.getElementById) {
                        //alert(!op5)
                        //alert(Elem)
			var elem = document.getElementById(Elem);
                        //alert(elem + ", 1036")
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) { 
			xPos = elem.style.pixelHeight;
		} else {
                                      if(getRefToDiv(Elem)==null)
                                              {
                                                  //alert(Elem + " | " + getRefToDiv(Elem))
                                              }
                         xPos = elem.offsetHeight;
                        //alert("to here height" + "," + xPos) 
		}
		return xPos;
	} 
}

function getElementWidth(Elem) {
	if (ns4) {
		var elem = getRefToDiv(Elem)  //getObjNN4(document, Elem);
		return elem.clip.width;
	} else {
		if(document.getElementById) {
			var elem = document.getElementById(Elem);
		} else if (document.all){
			var elem = document.all[Elem];
		}
		if (op5) {
			xPos = elem.style.pixelWidth;
		} else {
			xPos = elem.offsetWidth;
		}
		return xPos;
	}
}

// above from http://www.aspandjavascript.co.uk/javascript/javascript%5Fapi/get_element_width_height.asp




function showDiv(divID_as_a_string) {
    //get a reference as above ...
    myReference = getRefToDiv(divID_as_a_string);
    if( !myReference ) {
        //window.alert('Nothing works in this browser');
        return false; //don't go any further
        //return anything would work,
        //but I am using false to show failure
    }
    //now we have a reference to it
    if( myReference.style ) { //DOM & proprietary DOM
        myReference.style.visibility = 'visible';
    } else {
        if( myReference.visibility ) { //Netscape
            myReference.visibility = 'show';
        } else {
            //window.alert('Nothing works in this browser');
            return false; //don't go any further
        }
    }
    return true;
}


function writeLayer(layerID,txt)
   {

//     http://www.pageresource.com/dhtml/ryan/part3-1.html

      if(document.getElementById)
         {
            // alert(txt)
             document.getElementById(layerID).innerHTML=txt;
         }
      else if(document.all)
         {
             document.all[layerID].innerHTML=txt;
         }
      else if(document.layers)
         {
            with(document.layers[layerID].document)
                  {
                        open();
                        write(txt);
                        close();
                  }
          }
              
       place_circle();
   }   // close function





/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) 
             {
 		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) 
                      {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			
                                            return false;
	     	      } 
		else
		return true;
             }      








// from http://www.aspandjavascript.co.uk/javascript/javascript%5Fapi/get_element_width_height.asp
//function sniffBrowsers() {
	var ns4 = document.layers;
	var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) 
		||(navigator.userAgent.indexOf("Opera/5")!=-1);
	var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) 
		||(navigator.userAgent.indexOf("Opera/6")!=-1);
	var agt=navigator.userAgent.toLowerCase();
	var mac = (agt.indexOf("mac")!=-1);
	var ie = (agt.indexOf("msie") != -1); 
	var mac_ie = mac && ie;
        //alert(agt)
        //alert(!document.getElementById)
//}

function findImage(name, doc) {
	var i, img;
	for (i = 0; i < doc.images.length; i++) {
    	if (doc.images[i].name == name) {
			return doc.images[i];
		}
	}
	for (i = 0; i < doc.layers.length; i++) {
    	if ((img = findImage(name, doc.layers[i].document)) != null) {
			img.container = doc.layers[i];
			return img;
    	}
	}
	return null;
}







//  Below from  http://www.webreference.com

function getWidth(divName) 
  {
 
//   http://www.webreference.com/programming/javascript/dhtmlapps/3a.html

   if(document.layers) {//netscape 4.X
     tWidth = getRefToDiv(divName).width;
   } else {//W3C standard
      //alert(getRefToDiv(divName))
      tWidth = getRefToDiv(divName).offsetWidth;

   }
   return tWidth;
  }

//  Below from  http://www.webreference.com

function getHeight(divName) 
  {
 
//   http://www.webreference.com/programming/javascript/dhtmlapps/3a.html
   var obj_here=getRefToDiv(divName);
   //alert(obj_here.id)
   if (ns4) return obj_here.clip.height
   else return obj_here.clientHeight;

   // if(document.layers) {//netscape 4.X
   //   tHeight = getRefToDiv(divName).height;
   // } else {//W3C standard
   //    //alert(getRefToDiv(divName))
   //    tHeight = getRefToDiv(divName).offsetHeight;

   // }
   // return tHeight;
  }


function moveLayer() {

//   http://www.webreference.com/programming/javascript/dhtmlapps/3a.html

   if(document.layers) {//exception to the standard
      document.layers['mainLayer'].moveTo(475,35);
      //alternatively we could use:
      //mElement('mainLayer').moveTo(475,35);
   } else {//standard
      mElement('mainLayer').style.left = 475;
      mElement('mainLayer').style.top = 35;
   }
}






function toggle_highlight(the_cell,event)
  {
 
//   My function

         //alert(the_cell.style.color)
        //alert(td_get=getRefToDiv(the_cell))
        td_get=getRefToDiv(the_cell.id)
        //alert(td_get.firstChild.name)
     
        if(td_get.className!="hover_highlight" && td_get.className!="click_hover")
            {
                td_get.className="hover_highlight"
                //td_get.style.color="white"
                //td_get.style.font-color=white
                   
                   with(td_get.style)  
                      {
                         //td_get.style.color=white
                         //zIndex=11
                         //alert(td_get.style.font-color)
                      }
            }
        else if(td_get.className!="click_hover")
            {
                td_get.className="hover_highlight_off"
            }

  }





function Trim(TRIM_VALUE){
if(TRIM_VALUE.length < 1){
return"";
}
TRIM_VALUE = RTrim(TRIM_VALUE);
TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){
return "";
}
else{
return TRIM_VALUE;
}
} //End Function

function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function

function LTrim(VALUE){
var w_space = String.fromCharCode(32);
if(v_length < 1){
return"";
}
var v_length = VALUE.length;
var strTemp = "";

var iTemp = 0;

while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End  Trim Function




//inspect(img_get);

function inspect(elm){
  var str = "";
  for (var i in elm){
    str += i + ": " + elm.getAttribute(i) + "\n";
  }
  alert(str);
}



// Create a TABLE that contains all the properties of a named 
// object

function properties_table(objectname, object) {
  document.write("<table border=1 bgcolor=wheat><tr>");
  document.write("<td style='font-size: 18pt; font-weight: bold' colspan=2 align=center>");
  document.write("Properties of the <code>"+objectname+"</code> object</td></tr>");

  for (prop in object) {
     document.writeln("<tr><th>"+prop+"</th><td>"+
     object[prop]+"</td></tr>");
  }

  document.writeln("</table><p>");
}

//properties_table("document",document);












//  NEXT TWO FUNCTIONS ID WHICH KEY HAS BEEN PRESSED....
function showKey(e) {
  var key, shift, ctrl, mod;
  //if (is.gecko || is.opera) {
  //  key = e.which;
  //  shift = e.shiftKey;
  //  ctrl = e.ctrlKey;
 //}
  if (ns6) {
    key = e.which;
    mod = parseInt(e.modifiers);
    shift = (mod & 4)==4;
    ctrl = (mod & 2)==2;
  }
  else if (window.event) {
    key = window.event.keyCode;
    shift = window.event.shiftKey;
    ctrl = window.event.ctrlKey;
  }
                   if(key==27 && key!=null)
                      {
                         //alert(keyCode)
                         dynamic_move_boolean=false
                      }

  //window.status =
    alert("Key=" + key + "  Shift=" + (shift ? 'true' : 'false') + "  Ctrl=" + (ctrl ? 'true' : 'false') + "")
  return true;
}

//document.onmouseup=showKey;
//document.onkeypress=showKey;

function handler(e) {
    if (document.all) {
        e = window.event;
    }
    
    var key;

    if (document.layers)
        key = e.which;
    if (document.all)
        key = e.keyCode
    
    var chr = String.fromCharCode(key);
    alert('Character representation of pressed was ' + chr);
    
    alert('Unicode value of key pressed was ' + chr.charCodeAt(0));
    
}




function replace_contents_using_index(this_obj_as_string,new_content_index,the_array,restore_focus,href_obj)
   {
//   http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=14
     
     //show_image_bool=false;

     //get a reference as above ...
     myReference = getRefToDiv(this_obj_as_string);
     //alert(myReference)

     if(!myReference) 
        {
           //window.alert('Nothing works in this browser');
           return false; //don't go any further
           //return anything would work,
           //but I am using false to show failure
        }


       if( typeof( myReference.innerHTML ) != 'undefined' )
          {
          //used by the IE series, Konqueror, Opera 7+ and Gecko browsers
          //alert(the_array[new_content_index])
          //myReference.innerHTML="xxxxx xxxxxx xxxx"

          myReference.innerHTML = the_array[new_content_index]
          } 
       else
          {
                  if( myReference.document && myReference.document != window.document )  
                        {
                           //used by layers browsers
                           myReference.document.open();
                           myReference.document.write(the_array[new_content_index]);
                           myReference.document.close();
                        } 
                  else 
                        {
                            if( window.frames && window.frames.length && window.frames['nameOfIframe']) 
                               {
                                 //used by browsers like Opera 6-
                                 //if we attempt to rewrite the iframe content before
                                 //it has loaded we will only produce errors
                                 myReference = window.frames['nameOfIframe'].window;
                                 myReference.document.open();
                                 myReference.document.write(the_array[new_content_index]);
                                 myReference.document.close();
                               }
                        }
          }

       /* 
          if(restore_focus)
              {
                    //(getRefToDiv(restore_focus).style.fontSize=21)

                    //alert((restore_focus))
                   all_aaas_array=new Array()
                    all_aaas_array=[""]
                    all_aaas=document.getElementsByTagName('a')
     
                       //alert(all_aaas.length + all_aaas.item(0).id) 
    
                         for(i=0;i<=all_aaas.length-1;i++)
                            {
                              all_aaas_array[i]=all_aaas.item(i).id
                                if(all_aaas_array[i]==restore_focus)
                                    {
                                       alert(e)
                                       alert(getRefToDiv(all_aaas_array[i]))
                                       (getRefToDiv(restore_focus).style.fontSize=21)	
                                    }
                            } 
             }  //close restore_focus if

         if(e)
             {    // this can be used to access the click event....
        	var targ=0;
	        if (!e) var e = window.event;
	        if (e.target) targ = e.target;
	        else if (e.srcElement) targ = e.srcElement;
	        if (targ.nodeType == 3) // defeat Safari bug
		     targ = targ.parentNode;
                //alert(targ.id.style.fontSize=21)
                //alert(getRefToDiv(getRefToDiv(targ.id).id))//.style.fontSize=21))
             }
        */         

         if(href_obj)
             {
               //    NEXT LINE WORKS
               (getRefToDiv(href_obj).style.fontSize="21")
               //alert(getRefToDiv('myblog_052305').style)
             }

        //place_circle();
        setTimeout('place_circle();',300);

  }  //close Function





//-->

