// --------------------------------------------------------------------------------------
//  Javascript functions used within the Guide 2 Amateur Television project.
//      	Mike Stevens G7GTN (July 2003)  (C) G8YMM & G7GTN
//  Last updated:  Monday 29th September 2003
// --------------------------------------------------------------------------------------


// There are currently three functions at the end of this file that are not being
// used. Two of which are for page last updated stuff. The last is a JavaScript 
// on screen clock display. Included mainly for your interest.
// --------------------------------------------------------------------------------------


// End of page copyright (C) footer text.
function footer()
{
document.write('<font face="Verdana, Helvetica, Arial" size="1" color="#6c6c6c"><center>Copyright &copy;2003') 
document.write('&nbsp; G8YMM/G7GTN/G8VPG&nbsp; All rights reserved.</font></center>')
}  

// Home 
// Advertising link function. Presently goes back to 'index.htm'
function home()
{
document.write('<font face="Verdana, Helvetica, Arial" size="2"><b>')
document.write('<a href="index.htm"><font color="#FFFFFF">Home</font></a>')
}

// Contact email link function.
// You can remove the ?subject, If you would rather have the user key this field.
function contact()
{
document.write('<font face="Verdana, Helvetica, Arial" size="2"><b>')
document.write('<a href="mailto:?subject=Guide To ATV"><font color="#FFFFFF">Contact Us</font></a>')
}


// Advertising link function. Presently goes back to 'index.htm'
function advert()
{
document.write('<font face="Verdana, Helvetica, Arial" size="2"><b>')
document.write('<a href="index.htm"><font color="#FFFFFF">Advertising</font></a>')
}


// Photos link function. Presently goes back to 'index.htm'
function photo()
{
document.write('<font face="Verdana, Helvetica, Arial" size="2"><b>')
document.write('<a href="index.htm"><font color="#FFFFFF">Photos</font></a>')
}

// What's new pop up window. Change html within "new.htm"
// When closed the focus returns to the window below.
function whatsnew() 
{
ElementWindow = window.open('new.htm','FirstWin','width=450,height=425')
}


// Write blank spaces. Used on search.htm to lower the table and maintain more 
// consistent look of the other pages.
function blankspace()
{
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
document.write('<br>')
}

// Drop down combo box page navigation.
//
// Limitations each page has to have all the links as defined below:
// Box has a light blue colour, instead of usual white background.
// Change 'smabox' hex code within 'guidestyle.css' for a different colour.
function navigate()
{
document.write('<form name="mycombo">')
document.write('<SELECT class=smabox name="example" size="1">')
document.write('<option value="index.htm">Home</option>')
document.write('<option value="search.htm">Search</option>')
document.write('<option value="history.htm">History</option>')
document.write('<option value="batc.htm">BATC</option>')
document.write('<option value="gb3zz.htm">GB3ZZ</option>')
document.write('<option value="gb3xg.htm">GB3XG</option>')
document.write('<option value="repeater1.htm">Repeaters</option>')
document.write('<option value="rx.htm">Reception</option>')
document.write('<option value="70cms.htm">70CMs ATV</option>')
document.write('<option value="tx.htm">1.3GHz ATV</option>')
document.write('<option value="10ghz.htm">10GHz ATV</option>')
document.write('<option value="generator.htm">Video Sources</option>')
document.write('<option value="cables.htm">Cables</option>')
document.write('<option value="connectors.htm">Connectors</option>')
document.write('<option value="aerials.htm">Aerials</option>')
document.write('<option value="video.htm">Videos</option>')
document.write('<option value="computers.htm">Computers</option>')
document.write('<option value="testcard.htm">Testcards</option>')
document.write('<option value="dxtv.htm">DX TV</option>')
document.write('<option value="sstv.htm">SSTV</option>')
document.write('<option value="testequip.htm">Test Equipment</option>')
document.write('<option value="pic.htm">Pic Chips In ATV</option>')
document.write('<option value="mailto:?subject=Guide To Atv">Contact Us</option>')
document.write('</select>')
}

// Combo box quick links with GO image.
function go()
{
location=
document.mycombo.example.options[document.mycombo.example.selectedIndex].value
}

// Display user created status messages on the browser status bar.
function MM_displayStatusMsg(msgStr) 
{ 
  status=msgStr;
  document.MM_returnValue = true;
}

function tmt_winOpen(u,id,f,df)
{
	if(eval(id)==null||eval(id+".closed")){
	eval(id+"=window.open('"+u+"','"+id+"','"+f+"')");eval(id+".focus()");}
	else if(df){eval(id+".focus()");}
	else{eval(id+"=window.open('"+u+"','"+id+"','"+f+"')");eval(id+".focus()");}
}


// Page last updated script.
//
// Not used at present.

function updated()
{
var days = new Array(8);
days[1] = "Sunday";
days[2] = "Monday";
days[3] = "Tuesday";
days[4] = "Wednesday";
days[5] = "Thursday";
days[6] = "Friday";
days[7] = "Saturday";
var months = new Array(13);
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";
var dateObj = new Date(document.lastModified)
var wday = days[dateObj.getDay() + 1]
var lmonth = months[dateObj.getMonth() + 1]
var date = dateObj.getDate()
var fyear = dateObj.getYear()
if (fyear < 2000) 
fyear = fyear + 1900
document.write(wday + ", " + lmonth + " " + date + ", " + fyear)
}


// Alternative page last updated script
//
// Not used at present.

function LastUpDate()
{
document.write('<center><font size=1><font name="verdana">This Web Page Was Last updated : ');
document.write(document.lastModified);
document.write('</center>');
}


// Clock Script Generated By Maxx Blade's Clock v2.0
// http://www.maxxblade.co.uk/clock
//
// Not used at present.

function tS(){ x=new Date(tN().getUTCFullYear(),tN().getUTCMonth(),tN().getUTCDate(),tN().getUTCHours(),tN().getUTCMinutes(),tN().getUTCSeconds()); x.setTime(x.getTime()+0); return x; } 
function tN(){ return new Date(); } 
function lZ(x){ return (x>9)?x:'0'+x; } 
function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } 
function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) } 
function dT(){ window.status=''+eval(oT)+''; document.title=''+eval(oT)+''; if(fr==0){ fr=1; document.write('<font size=2 face=Arial><b><span id="tP">'+eval(oT)+'</span></b></font>'); } tP.innerText=eval(oT); setTimeout('dT()',1000); } 
function aP(x){ return (x>11)?'pm':'am'; } 
var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),fr=0,oT="dN[tS().getDay()]+' '+tS().getDate()+' '+mN[tS().getMonth()]+' '+y2(tS().getYear())+' '+':'+':'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())";


// Use the following within your HTML to Start/display your clock
// <script language="JavaScript">dT();</script>

// End of file

