// Global variables
var g_days   = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

var g_months = new Array("January", "February", "March", "April", "May", "June",
                         "July", "August", "September", "October", "November", "December");
//var theMoment = new Date();
var g_theDay;
var g_theYear;
var g_theDate;
var g_theHour;
var g_theMinute;
var g_theSecond;

var g_bFlag = false;

var g_nTimerInterval = 1000;

//var theimage = new Image();
//theimage.src = "btn_down.gif";


var IE   = (navigator.appName.indexOf("Microsoft")!=-1);
var NAV  = (navigator.appName.indexOf("Netscape")!=-1);
var IE3  = IE && (navigator.appVersion.indexOf("3.")!=-1);
var NAV3 = NAV && (navigator.appVersion.indexOf("3.")!=-1);
var V4   = (!IE3) && (!NAV3);
var platstyle

switch (navigator.platform) {
  case "Win32":
    if (V4) {
      if (NAV) {platstyle = 'win32 Navigator V4+';}
      if (IE)   {platstyle = 'win32 IE V4+';        }
    }
    else { platstyle = 'win32';}
  break;
  case "MacPPC":
    if (V4)  {
      if (NAV){  platstyle = 'Mac Netscape V4+';  }
      if (IE) {  platstyle = 'Mac IE V4+';        }
    }
    else { platstyle = 'Mac';             }
  break;
  default:
    if (V4)  {
      if (NAV) { platstyle = 'Netscape V4+';    }
      if (IE)  { platstyle = 'IE V4+';            }
    }
    else { platstyle = "Default";    }
}


// Output the line that will provide the RSS Feed
document.write('<link href="http://wig.dnsalias.com/feed.xml" rel="alternate" type="application/rss+xml" title="rss" />')


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

function AddLeadingZeroIfNeeded(theNum)
{
  // If the Number is less than 10 add the leading zero
  if (theNum < 10)  {
    theNum = "0" + theNum;
  }

  return theNum;
} // AddLeadingZeroIfNeeded

//////////////////////////////////////////////////////////////////
function CorrectYearIfNeeded(theNum)
{
  // 
  if ( (theNum < 1000) && (theNum > 0)    ) 
  {
    theNum += 1900;    
  }
  
  return theNum;
} // CorrectYearIfNeeded



//document.write (platstyle+'<br />')
function toUnderline(obj){if (IE) {obj.style.textDecoration="underline"}}
function toNormal(obj){if (IE) {obj.style.textDecoration="none"}}

//////////////////////////////////////////////////////////////////////////////////
//frame[0]=top  frame[1]=contents  frame[2]=main  frame[3]=right  frame[4]=bottom
function PrintLastModifiedDate()
{
  var sDate   = parent.window.frames[2].document.lastModified;
  var sURL    = parent.window.frames[2].document.URL;
  var theDate = new Date(sDate);
  
  
  if (sURL.indexOf("cgi",0) == -1) {
  document.getElementById("lastmod").innerHTML = 
                 ' Last Modified: ' + 
                 AddLeadingZeroIfNeeded(theDate.getHours()) + ':' +
                 AddLeadingZeroIfNeeded(theDate.getMinutes()) + ':' +
                 AddLeadingZeroIfNeeded(theDate.getSeconds()) + ' ' +
                 //g_days[theDate.getDay()] + ' ' +
                 AddLeadingZeroIfNeeded(theDate.getDate()) + '/' +
                 AddLeadingZeroIfNeeded(theDate.getMonth()) + '/'+ //g_months[theDate.getMonth()] + '/' +
                 CorrectYearIfNeeded(theDate.getYear())+'&nbsp&nbsp';
  }
  else {
    document.getElementById("lastmod").innerHTML = sURL +'&nbsp&nbsp';;
  }
  //document.write('Page Last Modified: ' + //sDate + ' ' +
  //               g_days[theDate.getDay()] + ' ' +
  //               theDate.getDate() + ' ' +
  //               g_months[theDate.getMonth()] + ' ' +
  //               theDate.getYear()
  //               //theDate.getDay() + ' ' +
  //               //theDate.get
  //               );
                 
  setTimeout('PrintLastModifiedDate()', 500);
                 
}//PrintLastModifiedDate


//////////////////////////////////////////////////////////////////////////////////
function PrintBrowserDetails_Not_used()
{
  document.write('<table class="bodytextbold" align="center" border="0"><tr><td colspan="2">');
  
  document.write('You are using the following browser/platform.');
  document.write('&nbsp;&nbsp;(' + platstyle + ')</td></tr>');
  
  
  document.write('<tr class="bodytext"><td width="80">');
  document.write('Product : </td> <td> ' +  + '</td> </tr>' );

  document.write('<tr class="bodytext"><td width="80">');
  document.write('Application : </td> <td> ' + navigator.appName    + '</td> </tr>' );
  
  document.write('<tr class="bodytext"><td>');
  document.write('Version :    </td> <td> ' + navigator.appVersion + '</td> </tr>');
  
  document.write('<tr class="bodytext"><td>');
  document.write('Platform :  </td> <td> ' + navigator.platform   + '</td> </tr>');
  document.write('</table>');
}//PrintBrowserDetails

var g_flashPage = '';

//////////////////////////////////////////////////////////////////////////////////
function RefreshForumList1()
{
  // It's safe to use replace(). Good...we won't break the back button.
  parent.window.location.replace(g_flashPage);  
}//RefreshForumList1

//////////////////////////////////////////////////////////////////////////////////
function RefreshForumList(flashPage)
{
  g_flashPage = flashPage;
  setTimeout('RefreshForumList1()', 2000);
//setTimeout('TimerTimeout()',g_nTimerInterval);
  
  
}//RefreshForumList


//////////////////////////////////////////////////////////////////////////////////
function PrintBackTo(str)
{
  if (str == '') {
    str = 'Back';
  }

  document.write('<table class="bodytextbold">');
  document.write('<tr>');
  document.write('<td>');
  document.write('<a class="onwhitenoline" title="'+str+'" id="'+str+'" onclick="window.history.back()" href="#" >');
  document.write('<img border="0" id="imgBack" name="imgBack" alt="Go Back" title="Go Back" src="/images/structure/btn_arrow_back.gif">');
  document.write('</td>');
  document.write('');
  document.write('<td>');
  document.write('<a class="onwhitenoline" title="'+str+'" id="'+str+'" onclick="window.history.back()" href="#" >');
  document.write(str+'</a>');
  document.write('</td>');
  document.write('</tr>');
  document.write('</table>');
} //function PrintBackTo(str)


///////////////////////////////////////////////////////////////////////////////
////////////////////     Timer Functions     //////////////////////////////////
///////////////////////////////////////////////////////////////////////////////


function TimerTimeout()
{
  if (g_bFlag) {
    OutputTimeToForm(form2);
    //window.alert("ShuttleA")
    setTimeout('TimerTimeout()',g_nTimerInterval);
  }
} // TimerTimeout


function StartTimer(nTimerValue)
{
  //window.alert(nTimerValue);
  // Only start the timer if the timer is not already running.
  if (!g_bFlag) {
    g_nTimerInterval = nTimerValue;
    g_bFlag          = true;

    setTimeout('TimerTimeout()', g_nTimerInterval);
  }
} // StartTimer


function StopTimer()
{
  g_bFlag = false;
} // StopTimer




/////////////////////////////////////////////////
// Function declarations
function UpdateDate()
{
  var theMoment = new Date();

  g_theDate   = theMoment.getDate();
  g_theSecond = theMoment.getSeconds();
  g_theMinute = theMoment.getMinutes();
  g_theHour   = theMoment.getHours();
  g_theDay    = theMoment.getDay();
  g_theMonth  = theMoment.getMonth();
  g_theYear   = theMoment.getYear();

  // Add leading zeros if needed
  g_theDate   = AddLeadingZeroIfNeeded(g_theDate);
  g_theHour   = AddLeadingZeroIfNeeded(g_theHour);
  g_theMinute = AddLeadingZeroIfNeeded(g_theMinute);
  g_theSecond = AddLeadingZeroIfNeeded(g_theSecond);
  g_theYear   = CorrectYearIfNeeded(g_theYear);

  // Don't allow 24:00
  if (g_theHour > 23)  {
    g_theHour -= 24
  }
} // UpdateDate

//////////////////////////////////////////////////////////
function GetDateString()
{
  UpdateDate();

  return g_days[g_theDay] + ","  + g_theDate + " " + g_months[g_theMonth] + " "  + g_theYear;
} // GetDateString


/* Original Easter Calculation from 
   http://aa.usno.navy.mil/faq/docs/easter.html
c = y / 100
n = y - 19 * ( y / 19 )
k = ( c - 17 ) / 25
i = c - c / 4 - ( c - k ) / 3 + 19 * n + 15
i = i - 30 * ( i / 30 )
i = i - ( i / 28 ) * ( 1 - ( i / 28 ) * ( 29 / ( i + 1 ) )
    * ( ( 21 - n ) / 11 ) )
j = y + y / 4 + i + 2 - c + c / 4
j = j - 7 * ( j / 7 )
l = i - j
m = 3 + ( l + 40 ) / 44
d = l + 28 - 31 * ( m / 4 )
*/

////////////////////////////////////////////////////
function ifEaster()
{
  UpdateDate();

  var bEaster = false;
  var c = 0;
  var i = 0;
  var j = 0;
  
  var y =  g_theYear;

  // Need to convert all divisions to Integer Divisions using floor. x
  c = Math.floor(y / 100)
  n = y - 19 * Math.floor( y / 19 )
  k = Math.floor(( c - 17 ) / 25)
  i = c - Math.floor(c / 4) - Math.floor(( c - k ) / 3) + (19 * n) + 15
  i = i - 30 * Math.floor( i / 30 )
  i = i - Math.floor( i / 28 ) * ( 1 - Math.floor( i / 28 ) * Math.floor( 29 / ( i + 1 ) )
      * Math.floor( ( 21 - n ) / 11 ) )
  j = y + Math.floor(y / 4) + i + 2 - c + Math.floor(c / 4)
  j = j - 7 * Math.floor( j / 7 )
  l = i - j
  m = (3 + Math.floor(( l + 40 ) / 44))
  d = l + 28 - 31 * Math.floor( m / 4 )
  
  m = m-1;
  
  //alert("Easter is M="+m+" D="+d );
  if ( ( d == g_theDate ) && ( m == g_theMonth ) ) {
    bEaster = true;
  }
 
  return bEaster;
}//ifEaster

/////////////////////////////////////////////////////////
function Greeting()
{
  UpdateDate();

  // Months start at 0
  // Days start at 1 !
  
  if (ifEaster()) {
    document.write("Easter wishes ");
  }
  else if (g_theMonth == 11) {
    document.write("Merry Christmas ");
  }
  else if (g_theMonth == 3 && g_theDate == 23) {
    document.write("Happy St George's Day ");
  }
  else if (g_theMonth == 0 && g_theDate == 1) {
    document.write("Happy New Year ");
  }
  else if (g_theMonth == 2 && g_theDate == 17) {
    document.write("Happy St Patrick's Day ");
  }
  else if (g_theMonth == 2 && g_theDate == 1) {
    document.write("Happy St David's Day ");
  }
  else {
    if      (g_theHour < 12) document.write("Good morning ");
    else if (g_theHour < 18) document.write("Good afternoon ");
    else                     document.write("Good evening ");
  }
} // Greeting

///////////////////////////////////////////////////////////
function  GetTimeString()
{
  UpdateDate();

  return g_theHour +":"+ g_theMinute +":"+ g_theSecond;
} // GetDateString

///////////////////////////////////////////////////////////
function  GetDateString()
{
  UpdateDate();

  return g_days[g_theDay] +", "+ g_theDate +" "+ g_months[g_theMonth] +" "+ g_theYear;
} // GetDateString

///////////////////////////////////////////////////////////
function  PrintDateAndTimeString()
{
  UpdateDate();

  document.write( GetDateString() +" - "+ GetTimeString());
} // GetDateString


///////////////////////////////////////////////////////////
function  GetYear()
{
  UpdateDate();

  return g_theYear;
} // GetYear


///////////////////////////////////////////////////////////
function PrintDate()
{
  UpdateDate();

  document.write(GetDateString());

} // PrintDate
  
///////////////////////////////////////////////////////////
function PrintTime()
{
  UpdateDate();
  document.write(GetTimeString());
} // PrintDate  
  
  

///////////////////////////////////////////////////////////
function OutputTimeToForm(form)
{
  UpdateDate();
  var theTime = "Time - " + GetTimeString();

  form.InputForm.value = GetTimeString();
  Scroll.innerText     = theTime;
  para1.innerText      = theTime;
  greeting.innerText   = theTime;
  //window.alert("Time - " + theHour +":"+ theMinute +":");
} // OutputDateToForm




function WM_preloadImages() {
/*
WM_preloadImages()
Loads images into the browser's cache for later use.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
*/
  // Don't bother if there's no document.images
  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}






function WM_imageSwap(daImage, daSrc){
  var objStr,obj;
  /*
    WM_imageSwap()
    Changes the source of an image.

    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Shvatz
    Author Email: shvatz@wired.com

    Usage: WM_imageSwap(originalImage, 'newSourceUrl');

    Requires: WM_preloadImages() (optional, but recommended)
    Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
    with variables in ie3 for the mac.
    */

  // Check to make sure that images are supported in the DOM.
  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

function PrintWigLine()
{

}//PrintWigLine

function PrintWigMenuLine(name, ref, text)
{
  var Output = "";
  var array

  Output+= '<tr valign="middle"><td></td><td valign="middle" bgColor=#6699ff>';
  Output+= '  <a class=menuitem href="' + ref +'" ';
  Output+=   'onMouseOver="WM_imageSwap('+ "'" + name+ "', '/images/structure/btn.gif'" + ');" ';
  Output+=   'onMouseOut="WM_imageSwap('+ "'" + name+ "', '/images/structure/btn_down.gif'" + ');" ';
  Output+= '  >';
  Output+= ' <img name="'+ name +'" height="8" src="/images/structure/btn_down.gif" border="0" />';
  Output+= '&nbsp;&nbsp;';
  Output+= text;
  Output+= '    </a></td></tr>';

  return(Output);
} //PrintWigMenuLine

function PrintWigMenuLine2(name, ref, text)
{
  var Output = "";
  var array

  Output+= '<tr valign="middle"><Td></td><td valign="middle" bgColor=#6699ff>';
  Output+= '  <a target="Search" class=menuitem href="./' + ref +'" ';
  Output+=   'onMouseOver="WM_imageSwap('+ "'" + name+ "', '/images/structure/btn.gif'" + ');" ';
  Output+=   'onMouseOut="WM_imageSwap('+ "'" + name+ "', '/images/structure/btn_down.gif'" + ');" ';
  Output+= '  >';
  Output+= ' <img name="'+ name +'" height="8" SRC="/images/structure/btn_down.gif" border="0" />';
  Output+= '&nbsp;&nbsp;';
  Output+= text;
  Output+= '    </a></td></tr>';

  return(Output);
} //PrintWigMenuLine2

/*
function PrintWigMenuLineF(name, ref, text)
{
  var Output = "";
  var array

  Output+= '<tr valign="middle"><Td></td><td valign="middle" bgColor=#6699ff>';
  Output+= '  <a target="main" class=menuitem href="' + ref +'" ';
//  Output+=   'onMouseDown="WM_imageSwap('+ "'" + name+ "', '/images/structure/close.gif'" + ');" ';
  Output+=   'onMouseOver="WM_imageSwap('+ "'" + name+ "', '/images/structure/btn.gif'" + ');" ';
  Output+=   'onMouseOut="WM_imageSwap('+ "'" + name+ "', '/images/structure/btn_down.gif'" + ');" ';
  Output+= '  >';
  Output+= ' <img name="'+ name +'" height="8" SRC="/images/structure/btn_down.gif" border="0" />';
  Output+= '&nbsp;&nbsp;';
  Output+= text;
  Output+= '    </a></td></tr>';

  return(Output);
} //PrintWigMenuLineF
*/

///////////////////////////////////////////////////////////
function PrintWigMenu()
{
  var Output = "";

  Output+= '<table width="100%">';
  Output+= '    <tr> <td colspan="2"  class="menutitle">  <hr />The Wig';
  //Output+= '  <img height=60 src="images/thumbs/tn_thewig2.gif" width=60 >';
  Output+= '<hr /></td></tr>';
  Output+= PrintWigMenuLine('home','/home.html','Home');//'    <tr height="10"><td valign="middle" bgColor=#6699ff><img SRC="btn.gif">&nbsp;<A class=menuitem href=".">Home</A></td></tr>';
  Output+= PrintWigMenuLine('who','/whoarewe.html','Who are we?');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="whoarewe.html">Who are we?</A></td></tr>';
  Output+= PrintWigMenuLine('worked_with','/workedwith.html','Worked With?');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="workedwith.html">Who Have We Worked With?</A></td></tr>';
  Output+= PrintWigMenuLine('others','/othergroups.html','Associated Artists');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="othergroups.html">Associated Groups/Artists</A></td></tr>';
  Output+= PrintWigMenuLine('contact','/contact_the_wig.html','How To Contact Us');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="contact_the_wig.html">How To Contact Us</A></td></tr>';
  Output+= PrintWigMenuLine('news','/wignews.html','Wig News');//'    <tr> <td valign="middle" bgColor=#6699ff><A class=menuitem_hilight href="wignews.html">Wig News <img height="11" BORDER="0" SRC="new.gif"></A></td></tr>';
  Output+= '    <tr> <td colspan="2" class="menutitle" bgColor=#6699ff> <hr />The Music<hr /></td></tr>';
  Output+= PrintWigMenuLine('gigs','/giglisting.html','Wig Gigs');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="gigListing.html">Wig Gigs</A></td></tr>';
  Output+= PrintWigMenuLine('wig_tunes','/wigtunes.html','Wig Tunes');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigtunes.html">Wig Tunes</A></td></tr>';
  Output+= PrintWigMenuLine('covers','/covers.html','Wig Covers');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="covers.html">Wig Covers</A></td></tr>';
  Output+= '    <tr> <td colspan="2" class="menutitle" bgColor=#6699ff> <hr />Other Stuff<hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_kit','/wigkit.html','Wig Kit');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigkit.html">Wig Kit</A></td></tr>';
  Output+= PrintWigMenuLine('wig_pets','/wigpets.html','Wig Pets');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_likes','/wiglikes.html','Wig Look-a-Likes ');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_art','/wigart.html','Wig Art');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_search','/cgi-bin/searchsite.exe','Wig Search');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= '    <tr> <td height="1" colspan="2" class="menutitle" bgColor=#6699ff> <hr /></td></tr>';
  Output+= '</table>';

//  alert(Output);
  document.write(Output);
} // PrintWigMenu  

///////////////////////////////////////////////////////////
function PrintWigMenu2()
{
  var Output = "";

  Output+= '<table width="100%">';
  Output+= '    <tr> <td colspan="2"  class="menutitle">  <hr />The Wig';
  //Output+= '  <img height=60 src="images/thumbs/tn_thewig2.gif" width=60 >';
  Output+= '<hr /></td></tr>';
  Output+= PrintWigMenuLine('home','/home.html','Home');//'    <tr height="10"><td valign="middle" bgColor=#6699ff><img SRC="btn.gif">&nbsp;<A class=menuitem href=".">Home</A></td></tr>';
  Output+= PrintWigMenuLine('who','/whoarewe.html','Who are we?');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="whoarewe.html">Who are we?</A></td></tr>';
  Output+= PrintWigMenuLine('worked_with','/workedwith.html','Worked With?');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="workedwith.html">Who Have We Worked With?</A></td></tr>';
  Output+= PrintWigMenuLine('others','/othergroups.html','Associated Artists');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="othergroups.html">Associated Groups/Artists</A></td></tr>';
  Output+= PrintWigMenuLine('contact','/contact_the_wig.html','How To Contact Us');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="contact_the_wig.html">How To Contact Us</A></td></tr>';
  Output+= PrintWigMenuLine('news','/wignews.html','Wig News');//'    <tr> <td valign="middle" bgColor=#6699ff><A class=menuitem_hilight href="wignews.html">Wig News <img height="11" BORDER="0" SRC="new.gif"></A></td></tr>';
  Output+= '    <tr> <td colspan="2" class="menutitle" bgColor=#6699ff> <hr />The Music<hr /></td></tr>';
  Output+= PrintWigMenuLine('gigs','/giglisting.html','Wig Gigs');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="gigListing.html">Wig Gigs</A></td></tr>';
  Output+= PrintWigMenuLine('wig_tunes','/wigtunes.html','Wig Tunes');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigtunes.html">Wig Tunes</A></td></tr>';
  Output+= PrintWigMenuLine('covers','/covers.html','Wig Covers');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="covers.html">Wig Covers</A></td></tr>';
  Output+= '    <tr> <td colspan="2" class="menutitle" bgColor=#6699ff> <hr />Other Stuff<hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_kit','/wigkit.html','Wig Kit');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigkit.html">Wig Kit</A></td></tr>';
  Output+= PrintWigMenuLine('wig_pets','/wigpets.html','Wig Pets');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_likes','/wiglikes.html','Wig Look-a-Likes ');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_art','/wigart.html','Wig Art');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLine('wig_search','/cgi-bin/searchsite.exe','Wig Search');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= '    <tr> <td height="1" colspan="2" class="menutitle" bgColor=#6699ff> <hr /></td></tr>';
  Output+= '</table>';

//  alert(Output);
  document.write(Output);
} // PrintWigMenu  

///////////////////////////////////////////////////////////
/*********************************************************
function PrintWigMenuFrame()
{
  var Output = "";

  Output+= '<table width="100%">';
  Output+= '    <tr> <td colspan="2"  class="menutitle">  <hr />The Wig';
  //Output+= '  <img height=60 src="images/thumbs/tn_thewig2.gif" width=60 >';
  Output+= '<hr /></td></tr>';
  Output+= PrintWigMenuLineF('home','/frames/home.html','Home');//'    <tr height="10"><td valign="middle" bgColor=#6699ff><img SRC="btn.gif">&nbsp;<A class=menuitem href=".">Home</A></td></tr>';
  Output+= PrintWigMenuLineF('who','/frames/whoarewe.html','Who are we?');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="whoarewe.html">Who are we?</A></td></tr>';
  Output+= PrintWigMenuLineF('worked_with','/frames/workedwith.html','Worked With?');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="workedwith.html">Who Have We Worked With?</A></td></tr>';
  Output+= PrintWigMenuLineF('others','/frames/othergroups.html','Associated Artists');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="othergroups.html">Associated Groups/Artists</A></td></tr>';
  Output+= PrintWigMenuLineF('contact','/frames/contact_the_wig.html','How To Contact Us');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="contact_the_wig.html">How To Contact Us</A></td></tr>';
  Output+= PrintWigMenuLineF('news','/frames/wignews.html','Wig News');//'    <tr> <td valign="middle" bgColor=#6699ff><A class=menuitem_hilight href="wignews.html">Wig News <img height="11" BORDER="0" SRC="new.gif"></A></td></tr>';
  Output+= '    <tr> <td colspan="2" class="menutitle" bgColor=#6699ff> <hr />The Music<hr /></td></tr>';
  Output+= PrintWigMenuLineF('gigs','/frames/giglisting.html','Wig Gigs');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="gigListing.html">Wig Gigs</A></td></tr>';
  Output+= PrintWigMenuLineF('wig_tunes','/frames/wigtunes.html','Wig Tunes');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigtunes.html">Wig Tunes</A></td></tr>';
  Output+= PrintWigMenuLineF('covers','/frames/covers.html','Wig Covers');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="covers.html">Wig Covers</A></td></tr>';
  Output+= '    <tr> <td colspan="2" class="menutitle" bgColor=#6699ff> <hr />Other Stuff<hr /></td></tr>';
  Output+= PrintWigMenuLineF('wig_kit','/frames/wigkit.html','Wig Kit');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigkit.html">Wig Kit</A></td></tr>';
  Output+= PrintWigMenuLineF('wig_pets','/frames/wigpets.html','Wig Pets');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLineF('wig_likes','/frames/wiglikes.html','Wig Look-a-Likes ');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLineF('wig_art','/frames/wigart.html','Wig Art');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= PrintWigMenuLineF('wig_search','/cgi-bin/searchsitef.exe','Wig Search');//'    <tr> <td bgColor=#6699ff><A class=menuitem href="wigpets.html">Wig Pets</A><hr /></td></tr>';
  Output+= '    <tr> <td height="1" colspan="2" class="menutitle" bgColor=#6699ff> <hr /></td></tr>';
  Output+= '</table>';

//  alert(Output);
  document.write(Output);
} // PrintWigMenuFrame
***********************************************************/

///////////////////////////////////////////////////////////
function PrintCopyright()
{
  var Output = '';
  UpdateDate();

  //Output +=  ' <DIV CLASS="copyright" ><A HREF="website.html"--> Copyright &copy; Paul Minopoli ';
  Output +=  ' <div class="copyright" >'
  Output +=  ' <a href="/frames/website.html" target="main"> Website Copyright &copy; Paul Minopoli 2002-';
  Output +=  g_theYear;
  Output +=  ' All Rights Reserved.</a></div>';

  document.write(Output);
} //PrintCopyright

///////////////////////////////////////////////////////////
function PrintGigHead()
{
  var Output = '';
  Output = '<table class="bodytextgig" width="480" border="0">';
  Output+= '<tr><td width=5>   </td>';
  Output+= '<td  align="center" width=44>Length</td>';
  Output+= '<td width="90">Title</td>';
  Output+= '</tr>';


  document.write(Output);
} //PrintGigHead

///////////////////////////////////////////////////////////
function PrintGigRow(nbr, time, mp3, title)
{
  var Output = '';
  var Loc   = '';
//  <tr><td>nbr</td> <td>time</td> <td><A CLASS="onwhite" HREF="mp3">title</A></td> </tr>

    Loc+= 'Listen to ';  Loc+= title;

    //Output+= '<td>';
    //Output+= '<A class=OnWhite ';
    //Output+= 'href="' + rmfile +' "> ';
    //Output+= '<img NAME="Speaker"';
    //Output+= ' ALT=';    Output+= Loc
    //Output+= ' TITLE=';  Output+= Loc
    //Output+= ' src="images/speaker.gif" BORDER="0" height="11" WIDTH="11" > ';
    //Output+= '</A>';
    //Output+= '</td>';




  Output+= '<tr><td>';
  Output+= '<tr><td>';  Output +=  nbr;
  Output+= '</td> <td align="center">';  Output +=  time;
  Output+= '</td> <td>';
  Output+= '<a title="'; Output +=  Loc; Output +=  '" class="onwhite" href="';  Output +=  mp3;
  Output+= '">';
    Output+= '<img name="Speaker"';
    Output+= ' alt="';    Output+= Loc
    Output+= '" title="';  Output+= Loc
    Output+= '" src="/images/speaker.gif" border="0" height="11" width="11" /> ';
  Output +=  title;
  Output+= '</a>';
  Output+= '</td> </tr>';

  document.write(Output);
} //PrintGigRow

///////////////////////////////////////////////////////////
function PrintGigTail(TotalTime)
{
  var Output = '';
  Output =  '<tr><td colspan="4"><hr /></td> </tr>';
  Output +=  '</table>';

  //Output = '<tr><td></td> <td><hr />';
  //Output+= TotalTime;
  //Output+= '</td> <td><hr /></td></td> </tr>';


  document.write(Output);
} //PrintGigHead

///////////////////////////////////////////////////////////
function PrintGig(date, ref, location, rmfile)
{
  var Output = '';
  var Loc    = '';

  Output+=  '<tr><td></td> <td>';//height="19"
  Output+=  date;
  Output+=  '</td>';

  if (rmfile != "") {
    Loc+= '"Listen to ';
    Loc+= location
    Loc+= ' gig in streaming audio (32Kbps)" ';

    Output+= '<td align="center" width="18">';
    Output+= '<a class=OnWhite ';
    Output+= 'href="' + rmfile +' "> ';
    Output+= '<img name="Real Logo"';
    Output+= ' alt=';
    Output+= Loc
    Output+= ' title=';
    Output+= Loc
    Output+= ' src="/images/speaker.gif" border="0" height="11" width="11" /> ';
    Output+= '</a>';
    Output+= '</td>';
  }
  else {
    Output+=  '<td></td>';
  }

  Output+=  '<td>';
  Output+=  '<a title="';
  Output+=  location;
  Output+=  '" class=OnWhite onclick="';
  Output+=  "openAboutWinSize('";
  Output+=  ref;
  Output+=  "',";
  Output+=  '600, 600)" '; // Height x Width
  Output+=  'href ="javascript://"  alt="';
  Output+=  location;
  Output+=  '">';
  Output+=  location;
  Output+=  '</a> </td></tr>'

  document.write(Output);
} //PrintGig


///////////////////////////////////////////////////////////
function PrintGigF(date, ref, location, rmfile)
{
  var Output = '';
  var Loc    = '';
  var sQuote = "'";

  Output+=  '<tr  onmouseover="javascript:style.background='+sQuote+'#E5E5E5'+sQuote+'" onmouseout="javascript:style.background='+sQuote+sQuote+'" ><td></td> <td height="20">';//height="19"
  Output+=  date;
  Output+=  '</td>';
  //alert(Output);

  if (rmfile != "") {
    Loc+= '"Listen to ';
    Loc+= location
    Loc+= ' gig in streaming audio (32Kbps)" ';

    Output+= '<td align="center" width="18">';
    Output+= '<a class=OnWhite ';
    Output+= 'href="' + rmfile +' "> ';
    Output+= '<img name="Real Logo"';
    Output+= ' alt=';
    Output+= Loc
    Output+= ' title=';
    Output+= Loc
    Output+= ' src="/images/speaker.gif" border="0" height="11" width="11" /> ';
    Output+= '</a>';
    Output+= '</td>';
  }
  else {
    Output+=  '<td></td>';
  }

  Output+=  '<td>';
  Output+=  '<a class="onwhite" title="';
  Output+=  location;
  Output+=  '"';
  Output+=  'href="';
  Output+=  ref;
  Output+=  '"';
  Output+=  'alt="';
  Output+=  location;
  Output+=  '">';
  Output+=  location;
  Output+=  '</a> </td></tr>'

  document.write(Output);
} //PrintGigF

//////////////////////////////////////////////////////////
function PrintKitRow (pic, descrip, text)
{
  var Output = '';

  Output += '<tr>';
  Output += '  <td></td>';
  Output += '  <td align="left" >';
  Output += '    <img src="';
  Output +=       pic;
  Output += '     " alt="';
  Output +=       descrip;
  Output += '     " title="';
  Output +=       descrip;
  Output += '"   />';
  Output += '  </td>';
  Output += '  <td></td>';
  Output += '  <td align="left">';
  Output +=      text;
  Output += '  </td>';
  Output += '</tr>';
  Output += '<tr><td height="2"></td> <td></td> <td></td><td></td></tr>';

  document.write(Output);
} //PrintKitRow

///////////////////////////////////////////////////////////
function PrintSongRow(html, mp3, title, about, mp3b)
{
  var Output = '';
  var Img = '<img title="Listen to '+title+' (mp3)" alt="Listen to '+title+' (mp3)" src="/images/speaker.gif" border="0" height="11" width="11" />';

  Output+= '<tr align="left" valign="top"><td width="10"></td>';
  Output+= '<td width="15">';

  // This used to check if the mp3 parameter was undefined but IE4 doesn't like that,
  // so check instead that the parameter is not blank.
  if (mp3 != '') {
    Output+= '<a class="onwhitenoline" title="Listen to ' + title+ '" href="'+ mp3+'" >'+ Img+' </a>';
  }
  Output+= '</td>';

  Output+= '<td width="20">';

  // This used to check if the mp3b parameter was undefined but IE4 doesn't like that,
  // so check instead that the parameter is not blank.
  if (mp3b != '') {
    var Img = '<img title="Listen to Demo Version (mp3)" alt="Listen to Demo version (mp3)" src="/images/speaker.gif" border="0" height="11" width="11" />';
    Output+= '&nbsp;<a class="onwhitenoline" title="Listen to Alternative version " href="'+ mp3b+'" >'+ Img +'</a>';
  }
  Output+= '</td>';

  Output+= '<td><div>';
  Output+= '  <a class="onwhitebold" ';//onclick="openAboutWinSize(' + "'"+ html + "'" + ', 600, 500)"';
  Output+= '     href="' + html + '"  title="Read about '+title+' ">'+title+'</a> ';


  Output+= '</div>'
  Output+= '<div class="bodytext">';

  Output+= about+' </div></td>';
  Output+= '<td></td>';
  //Output+= '<td CLASS="bodytext">';
  //Output+= '  <A CLASS=ONWHITE TITLE="Listen to ' + title+ '" HREF="'+ mp3+'" >mp3</A>';
  Output+= '</td>';


  Output+= '</tr>';
  document.write(Output);
} //PrintSongRow

///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
function openAboutWin(string)
{
   //var winArgs;

   //winArgs='width=450,height=370,scrollbars=yes,resizable=yes,status=no,toolbar=no,menubar=no'
   //if (navigator.appName.indexOf("Minopoli")>=0) {
   //   winArgs+=',left=300,top=200'
   //}
   //else{
   //   winArgs+=',screenX=300,screenY=200'
   //}
   openAboutWinSize(string, 370, 450);

   //myWin=open(string,"Minopoli",winArgs);
}//openaboutwin

///////////////////////////////////////////////////////////
function openAboutWinSize(string, height, width)
{
   var winArgs;
   winArgs=  'width=';   winArgs+= width;
   winArgs+= ',height='; winArgs+= height;

   winArgs+= ',scrollbars=yes,resizable=yes,'
   /*winArgs+= ',scrollbars=yes,resizable=yes,status=no,toolbar=yes,menubar=no'
   if (navigator.appName.indexOf("Minopoli")>=0) {
      winArgs+= ',left=';  winArgs+= left;
    winArgs+= ',top=';   winArgs+= top;
   }
   else{
      winArgs+= ',screenX='; winArgs+= left;
      winArgs+= ',screenY='; winArgs+= top;
   }*/

   //alert(winArgs);
   myWin=open(string,"Window", winArgs);
}//openaboutwin

function openWinFullNoAddress(string)
{
   var winArgs;
   winArgs+= ',scrollbars=yes,resizable=yes,status=yno,toolbar=yes,menubar=yes'

   myWin=open(string, "Window", winArgs);
}//openaboutwin


///////////////////////////////////////////////////////////
function AdjustImageHeight(imgHeight)
{
  var theHeight = 425;
  var res;
 // var imgHeight = 425;//594;

  //alert('In imgHeight is ' + imgHeight);

  if (IE) {
    theHeight = window.screen.availHeight;
  //alert('IE height is '+ theHeight);
  }
  else if  (NAV) {
    theHeight = window.screen.height;
  //alert('NAV height is '+ theHeight);
  }
  else {
    theHeight = 425;
  }

  if (theHeight >= 768) {
    res = 425;
  }
  //else if ((theHeight < 768) && (theHeight >= 600)) {
  //  res = 335;
  //}
  //else if ((theHeight < 600)) {
  //  res = imgHeight - 230;
  // }
  else {
    res = 335;
  }

 // switch (theHeight) {
 //   case  480 : res = imgHeight - 230; break; //390;break;
 //   case  600 : res = imgHeight - 95; break; //270;break;
 //   case  768 : res = imgHeight - 0; break; // 80;break;
 //   default   : res = 300;
 // }


  return(res);
} //AdjustImageHeight


///////////////////////////////////////////////////////////
function ShowResizedPic(pic)
{
  var Output = '';
  // Create new image object
  var tImage = new Image();
  // Link the image object to the image passed.
  tImage.src = pic;

  //alert('pic.name' + tImage.src);

  Output += '<p align="center">';
  //Output += '<a href="home.html">';
  Output += '<img name="THE_PIC" id="THE_PIC"  height="';
  Output += AdjustImageHeight(tImage.height);
  Output += '" border="0" src="'+ pic+'" alt="Click to enter The Clockwork Earwig website" title="Click to enter The Clockwork Earwig website" />';
  //Output += '</a>';
  Output += '</p>';

  //alert(Output);

  document.write(Output);
  //tImage = null;
} //ShowResizedPic


function Print()
{
//<a href=http://www.google.com/en>Google.com</a><span id=hp style="behavior:url(#default#homepage)"></span>
//<script>
//if (!hp.isHomePage('http://www.google.co.uk/')) {document.write("<p><a href=\"/mgyhp.html\" onClick=\"style.behavior='url(#default#homepage)';setHomePage('http://www.google.co.uk/');\">Make Google Your Homepage!</a>");}
//</script></font><p>
}


// Update the date now before the page starts to display.
UpdateDate();

