//if (window.parent.location!=window.location)
//	{
//	window.top.location.replace(window.location);
//	}

//////////////////////////////////////////////////////
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
var prefix = "";
var enabled = ie;
		var navbarpic = new Array(6);
		for (counter = 0; counter<6; counter++) {
			navbarpic[counter] = new Image();
//			if (n)
// 			  navbarpic[counter].src = prefix+'templates/nss_'+counter+'.gif';
//			else
 			  navbarpic[counter].src = prefix+'templates/ss_'+counter+'.gif';
		}

		function imswap(num)
		{
//		if (n)
//			document.images[0].src = navbarpic[num].src;
//		else
			document.images[0].src = navbarpic[num].src;
		}

		function olswap()
		{
//		if (n)
//			document.images[0].src = navbarpic[0].src;
//		else
			document.images[0].src = navbarpic[0].src;
		window.status='Welcome to Short Sited!';
		}



//////////////////////////////////////////////////////

var total = 4;

function errorHandler() {
//return true;
}
//window.onerror = errorHandler;

function objshow(showobj,val) 
{
if (enabled==false)
	return;
if (ie) 
	{
	for(var i=1;i<=total;i++) 
		{
		if (i != val) 
			{
			objhide("menu"+i);
			}
		else 
			{
			document.all[showobj].style.visibility = "visible";
			}
		}
	}

if (n) 
	{
	for(var i=1;i<=total;i++) 
		{
		if (i != val) 
			{
			objhide("menu"+i);
			}
		else
			{
			document.layers[showobj].visibility = "visible";
			}
		}
	}
return;
}

function objhide(hideobj) 
{
if (enabled==false)
	return;

//cY = event.clientY + document.body.scrollTop;
//cX = event.clientX + document.body.scrollLeft;


if (ie) 
	{
	document.all[hideobj].style.visibility = "hidden";
	}
if (n) 
	document.layers[hideobj].visibility = "hide";
return;
}



function makeLink(text,url,desc)
{
var stmess="'Welcome'";
desc2="'"+desc+"'";
document.writeln('        <a href="'+prefix+url+'" onMouseOver="window.status='+desc2+'; return true" onMouseOut="window.status='+stmess+'; return true;">'+text+'</a><br>');
return;
}

function newLine()
{
document.writeln('        <br>');
return;
}

function endMenu(name)
{
document.writeln('        <img src="mail/maillogo.gif" width=150 height=1><br>');
name2="'"+name+"'";
document.writeln('        <a href="javascript:objhide('+name2+');" onmouseover="objhide('+name2+');">[Close Menu]</a>');
return;

}

function startDiv(name,pos,clas,z)
{
document.writeln('<div id="'+name+'" style="background:rgb(62,122,67); position:absolute; z-index:'+z+'; left:'+pos+'px; top: 45px; visibility:hidden">');
document.writeln('  <table border=2 cellPadding=0 cellSpacing=0><tbody><tr><td>');
document.writeln('    <TABLE border=0 cellPadding=2 cellSpacing=0 width=100%>');
document.writeln('    <TBODY><TR><td class="'+clas+'" align=left>');
document.writeln('      <FONT color=#6f0009 face=Arial size=2>');
return;
}

function endDiv()
{
document.writeln('      </font>');
document.writeln('    </td></tr></tbody></table>');
document.writeln('  </td></tr></tbody></table>');
document.writeln('</div>');
document.writeln();
return;
}

function menu1(offs)
{
newLine();
startDiv("menu1",offs,"m1",3);
makeLink("Home Page","index.htm","Main entry point to Short Sited");
makeLink("About Geoff","aboutGeoff.htm","what I do, what I like, contact details, etc...");
makeLink("Contact Details","aboutGeoff.htm#contact details","If you need to contact me...");
newLine();
makeLink("Photo Gallery","photos/index.htm","Pictures taken from my life");
makeLink("Uni Work","uni/index.htm","Assignments, etc");
newLine();
makeLink("Friends and Hellos","friends.htm","Shoutouts to those who know me...");
makeLink("Friends web pages","friends_pages.htm","Friends web pages");
makeLink("Mirrors","mirrors.htm","Copies of this site elsewhere online");
newLine();
endMenu("menu1");
endDiv();
return;
}


function menu2(offs)
{
newLine();
startDiv("menu2",offs,"m2",5);
makeLink("<b><u>HTML Help</u></b>","html/index.htm","Index to HTML reference guides");
makeLink("HTML 3","html/3/index.htm","HTML 3 reference guide");
makeLink("HTML 4","html/4/index.htm","HTML 4 reference guide");
makeLink("HTML 4 (strict)","html/4s/index.htm","HTML 4 reference guide - redundant parts removed");
newLine();
makeLink("<b><u>CSS Style Sheets</u></b>","css/index.htm","Index to CSS reference guides");
makeLink("CSS 1","css/1/index.htm","CSS 1 reference guide");
makeLink("CSS 2","css/2/index.htm","CSS 2 reference guide");
newLine();
makeLink("Uni Work","uni/index.htm","Assignments, etc");
makeLink("Java Applets","java/index.htm","Useful (and useless) Java applets that I have written");
endMenu("menu2");
endDiv();
return;
}


function menu3(offs)
{
mname = "'menu3'";
document.writeln('<div id="menu3" style="position:absolute; z-index:6; left:'+offs+'px; top: 45px; visibility:hidden">');
document.writeln('            <FORM action=http://gkmail.zzn.com/email/english/login/loginaction.asp method=post name=mlogin >');
document.writeln('		<INPUT name=company type=hidden value=GKMail> ');
document.writeln('		<INPUT name=Interface type=hidden value=0> ');
document.writeln('		<INPUT name=java type=hidden value=1> ');
document.writeln('');
document.writeln('<table border=2 cellPadding=0 cellSpacing=0><tbody><tr><td>');
document.writeln('            <TABLE border=0 cellPadding=2 cellSpacing=0 width=100%>');
document.writeln('              <TBODY>');
document.writeln('	      <TR><td colspan=3 class="login" align=center>');
document.writeln('		<FONT color=#6f0009 face=Arial size=1><B>FREE Web Email and Pop3 access - <A href="http://gkmail.zzn.com/" target=_blank>Sign Up Here!</A> </B></FONT>');
document.writeln('              </td></TR>');
document.writeln('              <TR>');
document.writeln('		<TD class="login" rowspan=3><img src="'+prefix+'mail/maillogo.gif"></td>');
document.writeln('                <TD align=right class="login"><FONT color=#000099 face=Arial size=2><B>&nbsp;User Name:</B></FONT></TD>');
document.writeln('                <TD align=left class="login" >&nbsp;<INPUT maxLength=30 name=loginname size=10></TD>');
document.writeln('');
document.writeln('              </TR>');
document.writeln('');
document.writeln('              <TR>');
document.writeln('                <TD align=right class="login" ><FONT color=#000099 face=Arial size=2><B>&nbsp;Password:</B></FONT></TD>');
document.writeln('                <TD class="login">&nbsp;<INPUT maxLength=30  name=loginpassword size=10 type=password></TD>');
document.writeln('              </TR>');
document.writeln('');
document.writeln('	      <TR>');
document.writeln('	        <TD class="login" align=center colspan=2><INPUT alt=Login border=0 height=29 name=Log_in src="'+prefix+'mail/btn_lgn.gif" type=image width=67><a href="javascript:objhide('+mname+');"><FONT face=Arial size=1>[Close Menu]</font></a></TD>');
document.writeln('	      </TR>');
document.writeln('');
document.writeln('	      <TR><td colspan=3 class="login" align=center>');
document.writeln('                <FONT color=#808080 face=Arial size=1><A href="http://gkmail.zzn.com/TSupport/start.asp?Company=zzn&amp;subdomain=GKMail&amp;EIP=0" target=_top>Technical Support</A></FONT>');
document.writeln('                <FONT color=#808080 face=Arial size=1> | <A href="http://gkmail.zzn.com/email/english/noframes/help/p_help.asp" target=_blank>Help</A></FONT>');
document.writeln('                <FONT color=#808080 face=Arial size=1> | <A href="http://gkmail.zzn.com/email/english/login/HintLogin.asp?Company=GKMail&amp;Interface=0" target=_self>Password Reminder</A></FONT>');
document.writeln('              </td></TR>');
document.writeln('</TBODY>');
document.writeln('</TABLE>');
document.writeln('</td></tr></tbody></table>');
document.writeln('</FORM>');
document.writeln('</div>');
return;
}


function menu4(offs)
{
newLine();
startDiv("menu4",offs,"m4",4);
makeLink("Joke Junkyard","junkyard/index.htm","A collection of jokes accumulated via the email");
makeLink("From the News","junkyard/index.htm","The news does not always say what it should...");
newLine();
makeLink("Radio Stations","radio.htm","Links to Australian radio stations");
newLine();
makeLink("<u>Java Applets</u>","java/index.htm","Useful (and useless) Java applets that I have written");
makeLink("Mastermind Game","java/mastermind/index.htm","Java applet where you have to guess the colours in the correct order");
makeLink("Psycho Quiz","java/personalityQuiz/index.htm","A real pychological test which supposedly determines aspects of your personality");
makeLink("PNZ Game","java/pnz/index.htm","A different mastermind game");
newLine();

endMenu("menu4");
endDiv();
return;
}

//function addmenu(name, src,r,g,b,pos,z)
//{
//document.writeln('<div id="'+name+'" src="'+src+'" style="background:rgb('+r+','+g+','+b+'); position:absolute; z-index:'+z+'; left:'+pos+'px; top: 45px; visibility:hidden"></div>');
//}

function setupmenus(star)
{
//document.writeln('<center><h1>0</h1></center>');
if (enabled==false)
	return;
menu1(star+10);
menu2(star+100);
menu3(star+255);
menu4(star+345);
return;
}

function topstuff()
{
if (ie)
  document.writeln('<img src="'+prefix+'invis.gif" width=100% border=0 height="1" name="im7">');
}

function setup()
{
if (n)
	{
	setupmenus(window.innerWidth / 2 - 275-15);
	}
else
	{
	if (ie)
		{
		setupmenus(im7.width / 2 - 275);
		}
	}
}


function doprefix(pr)
{
 prefix = pr;
		for (counter = 0; counter<6; counter++) {
		  navbarpic[counter].src = prefix+'template/ss_'+counter+'.gif';
		}
}

function Enter()
{
if (event.keyCode == 13)
document.login.submit();
}

