// scdxc_header.js
// Script by STC Network Systems www.stcllp.com

// STC E-mail Script
document.write ('<SCRIPT SRC="stcllp.js"></SCRIPT>');
document.write ('<SCRIPT SRC="stc_mail.js"></SCRIPT>');

document.write ('<LINK REL="stylesheet" HREF="/style.css" TYPE="text/css">');

// Frame Popout
   if (window != top.window)
   {
   top.window.location = "" + window.location;
   }


var i;

var gsDateMod = new Date(document.lastModified);   

gnDocuments = 1;
gsCurrentName = document.location.pathname.toLowerCase ();
gasDocumentName = new createDocList (10, '');
gasDocumentTitle = new createDocList (10, '');

gasDocumentName[gnDocuments] = 'index';
gasDocumentTitle[gnDocuments] = 'Home';
gnDocuments++;

gasDocumentName[gnDocuments] = 'calendar';
gasDocumentTitle[gnDocuments] = 'Calendar';
gnDocuments++;

gasDocumentName[gnDocuments] = 'membership';
gasDocumentTitle[gnDocuments] = 'Membership';
gnDocuments++;

gasDocumentName[gnDocuments] = 'meetings';
gasDocumentTitle[gnDocuments] = 'Meetings';
gnDocuments++;

gasDocumentName[gnDocuments] = 'news';
gasDocumentTitle[gnDocuments] = 'QST QST QST';
gnDocuments++;

gasDocumentName[gnDocuments] = 'roster1';
gasDocumentTitle[gnDocuments] = 'Club Roster';
gnDocuments++;

if (gsCurrentName == '/')
{
    gsCurrentName = '/index';
}
gnCurrentLength = gsCurrentName.length;
gsCurrentPage = gsCurrentName.substring(1, gnCurrentLength);
gsCurrentTitle = document.title + '(' + gsCurrentPage + ')';

var agt=navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);

this.ie = (agt.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major < 4));

this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1))

this.nav4 = (this.nav && (this.major == 4));

if (this.ie3)
{
	document.write ('<TABLE border="0" width="100%" cellpadding=3 cellspacing=0>');
	document.write ('<TR>');
	document.write ('<TD width="700" ALIGN="right" VALIGN="middle">');
        document.write ('<FONT face="Verdana, Arial, Helvetica" COLOR="#000000" SIZE="-3">');

	document.write ('Internet Explorer (old): ', agt, ', ', this.major, ', ', this.minor);
	document.write ('</FONT>');
	document.write ('</TD>');
	document.write ('</TR>');
	document.write ('</TABLE>');
	document.write ('<HR SIZE="1" ALIGN="RIGHT" WIDTH="50%">');
}
else
{
    var DOWArray = new initArray ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");   
    var MOYArray = new initArray ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");   

    var mod_date = new Date (document.lastModified);   

    var hours = mod_date.getHours ();
    var minutes = mod_date.getMinutes ();
    var seconds = mod_date.getSeconds ();

    var timeValue = "" + ((hours > 12) ? hours - 12 : hours);

    var currname = document.location.pathname.toLowerCase ();

    timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
//    timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
    timeValue += (hours >= 12) ? " PM" : " AM";

    document.write ('<TABLE Border="0" Width="100%" CellPadding=3 CellSpacing=0>');
// ROW 1
    document.write ('<TR>');

// DATA CELL 1,1
//    document.write ('<TD Width="50%" Align="Left" VAlign="Middle" BgColor="333399">');
    document.write ('<TD Width="50%" Align="Left" VAlign="Middle" BGColor="#0080C8">');
    document.write ('<FONT Face="Verdana, Arial, Helvetica" Size="2" COLOR="White">');
    document.write ('<IMG SRC="/images/scdxc-logo-4.jpg" Width="60"ALT="SCDXC Logo" BORDER=0 Align=top></A>&nbsp;<B>Southern California DX Club</B></FONT>');
    document.write ('<FONT Size=2 Face="Verdana, Arial, Helvetica" COLOR="White">');
    document.write ('</FONT>');
    document.write ('</TD>');

    gnYearMod = mod_date.getYear ();
    if ((gnYearMod > 29) && (gnYearMod < 130))
    {
	gnYearMod += 1900
    }
    if (gnYearMod < 30)
    {
	gnYearMod += 2000
    }

//    document.write ('<TD Width="40%" Align="Center" VALIGN="middle" BGCOLOR="cc0000">');
    document.write ('<TD Width="50%" Align="Right" VALIGN="middle" BGColor="#0080C8">');
    document.write ('<FONT face="Verdana, Arial, Helvetica" COLOR="white" SIZE="-3">');
    document.write ('Page updated on:<BR> ');   
    if (gnYearMod != 1969)
    {
	// DATA CELL 1,2
	document.write (DOWArray[(mod_date.getDay()+1)], ', ');   
	document.write (MOYArray[(mod_date.getMonth()+1)], ' ');   
	document.write (mod_date.getDate (), ', '); 
	document.write (gnYearMod);
	document.write (', ', timeValue);
    }
    else
    {
	//document.write (document.title);
	document.write (document.frmDocMod.date.value);
    }
 
    document.write ('</FONT>');
    document.write ('</TD>');

// DATA CELL 1,3
//	document.write ('<TD Width="80" BGCOLOR="">');
//	doc_name = document.location.pathname.toLowerCase ();
//	document.write ('<IMG SRC="images/scdxc-logo-4.jpg" Width="50" ALT="SCDXC Logo" BORDER=0></A>');
//	document.write ('<A HREF="index.html"><FONT SIZE="5" color="white"><B>DX IS</B></FONT></A>');
//	document.write ('</TD>');
//    	document.write ('</TR>');
	document.write ('</TABLE>');
	document.write ('<CENTER>');


// CREATE OUTER TABLE WITH A BORDER AND 1 DATA CELL CONTAINING THE INNER TABLE
	document.write ('<TABLE Border="1" Width="100%" CellPadding="0" CellSpacing="0"><TR><TD>');

// CREATE INNER TABLE
	document.write ('<CENTER><TABLE Border="0" Width="100%" CellPadding="3" CellSpacing="0"><TR>');

	menuBar();
	
// MAILTO LINK
	document.write ('<TD Class="MenuLink" Align="center" vAlign="middle">');

// IF CURRENT DOCUMENT IS NOT THIS DOCUMENT # IN LIST, PRINT AS LINK
	document.write ('<Font size=2><A HREF=\"javaScript:stcllp(\'secretary\');\">E-mail SCDXC</A></Font>');
	document.write ('</TD>');

// CLOSE INNER TABLE
	document.write ('</TD></TABLE>');

// CLOSE OUTER TABLE
	document.write ('</TD></TR></TABLE>');
	document.write ('</CENTER>');

	
}

// MENU BAR
function menuBar()

{
	var i;

	// CHECK EACH DOCUMENT NAME IN LIST
	for (i = 1; i < gnDocuments; i++)
	{

		// CHECK IF CURRENT PAGE CONTAINS DOCUMENT #[i]	
		if (gsCurrentName.indexOf (gasDocumentName[i]) > -1)
		{
			document.write ('<TD Class="MenuCurr" Align="center" vAlign="middle">');
			// IF CURRENT DOCUMENT IS THIS DOCUMENT # IN LIST, USE BOLD TITLE
			document.write ('<B><Font size=2>', gasDocumentTitle[i], '</Font></B>');
		}
		else
		{
			document.write ('<TD Class="MenuLink" Align="center" vAlign="middle">');
			// IF CURRENT DOCUMENT IS NOT THIS DOCUMENT # IN LIST, PRINT AS LINK
			document.write ('<Font size=2><A HREF="http://www.scdxc.org/', gasDocumentName[i], '.html">', gasDocumentTitle[i], '</A> </Font>');
		}
		document.write ('</TD>');
	}
}

// INITIALIZE ARRAY
function initArray() 
{  
    this.length = initArray.arguments.length;
    for (var i = 0; i < this.length; i++)      
    {
		this[i+1] = initArray.arguments[i];
    }
}   

// REQUIRED JAVASCRIPT FUNCTION TO CREATE ARRAYS/LISTS
function createDocList(n, init)
{
	this.size = n;
	for (i = 1; i <= n; i++)
	{
		this[i] = init;
	}
	return this;
}

function hostAnnounce()
{
	var i = 0;
	var gsExpireDate;
      var gsTodaysDate;
	var gsExpireTest;
	var gsTodaysTest;
	var gnCurYear;
	var gnExpYear;
	var gnExpires;
	var gnCurrent;

      var MONArray = new initArray ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");   

	// STEP:1
	// ENTER ANNOUNCEMENT EXPIRATION DATE IN "Month Date, Year" FORMAT
	// e.g. 'July 31, 1999'
	var gsExpireDate = new Date ('December 06, 2009');

	// ANNOUNCEMENT LINE COUNTER
	var gnAnnounceLines = 0;

	gasAnnounceLine = new createDocList (10, '');
	gasAnnounceStyle = new createDocList (10, '');

	// STEP:1
	// ENTER TEXT AND FONT STYLE FOR AS MANY LINES AS DESIRED
	// FONTS:  B=Bold, I=Italic, 10-18=Point Size
	// LINE #0
	
	gasAnnounceStyle[gnAnnounceLines] = 'B12R';
	gasAnnounceLine[gnAnnounceLines] = '<B>QST QST QST</B>';
        //gasAnnounceLine[gnAnnounceLines] = 'Congratulations!!!';
	gnAnnounceLines++

	// LINE #1
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = 'For Southwestern Div. Convention Info';
	gnAnnounceLines++

	// LINE #2
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = 'See the <A HREF="http://www.scdxc.org/news.html">QST Page for Details</A>';
	gasAnnounceLine[gnAnnounceLines] = '<IMG SRC="images/tree.gif" Align="Center" Height="65"> The Holiday Party is December 6th <IMG SRC="images/han2.gif" Align="Center" Height="65">';
	gnAnnounceLines++
	
	// LINE #2a
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = 'features may not work properly. We will try to have these';
	gasAnnounceLine[gnAnnounceLines] = 'Get Your <A HREF="http://www.scdxc.org/holiday.html">Reservations</A> Early';
	gnAnnounceLines++

	// LINE #3
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = 'problems fixed as quick as possible.';
	gasAnnounceLine[gnAnnounceLines] = '<IMG SRC="images/rwb-line.gif" Height="3">';
	gnAnnounceLines++

	// LINE #4
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	gasAnnounceLine[gnAnnounceLines] = '&nbsp;';
	gnAnnounceLines++
	
	// LINE #5
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	gasAnnounceLine[gnAnnounceLines] = 'The January Meeting will be held at our usual location';
	//gasAnnounceLine[gnAnnounceLines] = 'See the <A HREF="http://www.scdxc.org/news.html">QST Page for Details</A>';
	gnAnnounceLines++

	// LINE #5a
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = '&nbsp;';
	gasAnnounceLine[gnAnnounceLines] = '<A HREF="http://www.scdxc.org/meetings.html">Syd Kronenthal Park in Culver City</A>';
	gnAnnounceLines++

	// LINE #6
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = '<IMG SRC="images/rwb-line.gif" Height="4">';
	//gasAnnounceLine[gnAnnounceLines] = 'Click Here for <A HREF="http://www.scdxc.org/picnic.html">Details</A>';
	gnAnnounceLines++

	// LINE #6a
	gasAnnounceStyle[gnAnnounceLines] = 'B10';
	//gasAnnounceLine[gnAnnounceLines] = 'ARRL requests members input on FCC';
	//gasAnnounceLine[gnAnnounceLines] = '&nbsp;';
	gnAnnounceLines++
        
	// LINE #7
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = 'For Info on DXer of the Year, Clipperton Award &amp; 2006 Holiday';
	gasAnnounceLine[gnAnnounceLines] = '<IMG SRC="images/rwb-line.gif" Height="4">';
	gnAnnounceLines++

	//LINE #8
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	gasAnnounceLine[gnAnnounceLines] = 'For Updates on Don, N6IC';
	//gasAnnounceLine[gnAnnounceLines] = 'Party Pictures. See the <A HREF="http://www.scdxc.org/wwwnews.shtml">QST Page</A> for Details';
	gnAnnounceLines++

	// LINE #9
	gasAnnounceStyle[gnAnnounceLines] = 'B12';
	//gasAnnounceLine[gnAnnounceLines] = '<Font Color="Red">2003 Dues must be received by February 18 <BR> to receive the March Newsletter.</Font>';
        gasAnnounceLine[gnAnnounceLines] = 'See the <A HREF="http://www.scdxc.org/news.html">QST Page</A>';
	gnAnnounceLines++


	gsTodaysDate = new Date ();

	if (navigator.appName == ("Netscape"))
	{
		gnCurYear = gsTodaysDate.getYear () + 1900;
		gnExpYear = gsExpireDate.getYear () + 1900;
	}
	else
	{
		gnCurYear = gsTodaysDate.getYear ();
		gnExpYear = gsExpireDate.getYear ();
	}

	gsTodaysTest = MONArray[(gsTodaysDate.getMonth()+1)] + ' ' + gsTodaysDate.getDate () + ', ' + gnCurYear;

	gsExpireTest = MONArray[(gsExpireDate.getMonth()+1)] + ' ' + gsExpireDate.getDate () + ', ' + gnExpYear;

	gnExpires = Date.parse (gsExpireTest);
	gnCurrent = Date.parse (gsTodaysTest);

	if (gnExpires < gnCurrent)
	{
		return
	}

	document.write ('<BR>');

	// OUTER TABLE
	document.write ('<CENTER><TABLE Border="4" CellSpacing="0" Width="50%" BorderColor="cc0000" BGCOLOR="White"><TR><TD Align="Center">');

	// INNER TABLE
	document.write ('<TABLE Border="0" BgColor="White">');

	for (i = 0; i < gnAnnounceLines; i++)
	{

		document.write ('<TR><TD Align="Center" Class="', gasAnnounceStyle[i], '">');
		document.write (gasAnnounceLine[i]);
		document.write ('</TD></TR>');
	}

	document.write ('</TABLE>');
	document.write ('</TD></TR></TABLE></CENTER>');

	document.write ('<CENTER><FONT Size="-2">');
	document.write ('Announcement Expires after ', gsExpireTest);
	document.write ('</CENTER></FONT><BR>');
}



document.write ('<DIV Id="divPop"></DIV>');
