

/* ***********************************************  */
/* **********   START of Frame Buster  ***********  */
/* ***********************************************  */


var vOnlineDev = "http://www.nems.com.au/dev";
var vOnlineTest = "http://www.nems.com.au/test";
var vOnlineProd = "http://www.nems.com.au";

var vOfflineDev = "file:///data/netusers/NemsUpload/dev";
var vOfflineTest = "file:///data/netusers/NemsUpload/test";
var vOfflineProd = "file:///data/netusers/NemsUpload/prod";

var vWinDev = "file:///d:/NemsUpload/dev";
var vWinTest = "file:///d:/NemsUpload/test";
var vWinProd = "file:///d:/NemsUpload/prod";

var vParent = "/index.html"

var vSubPath = vOfflineDev;       // Change this to the environment
var vSetPath = vSubPath + vParent;

function ensureTop()
{
  if (top != self)
    top.location.href = location.href;
}

function ensureNems()
{

  if (top.location.href.search(vSubPath) == -1)
    top.location.href = vSetPath;
}

function ensureNemsSunesis()
{
  if (top != self)
  {
    if (top.location.href.search(vSubPath) == -1)
      top.location.href = location.href;
  }
}


/* ***********************************************  */
/* **********   END of Frame Buster    ***********  */
/* ***********************************************  */




/* ***********************************************  */
/* ******   START of page structure layout  ******  */
/* ***********************************************  */


function start1()
{
  document.write('<table width="100%" cellspacing="0" cellpadding="0" border="0" valign="top">');
  document.write('<tr>');
  document.write('<td width="158" valign="top" align="left">');
}

function start2()
{
  document.write('<table width="100%" border="0" align="left"');
  document.write(' background="../i/navbg.gif" bgcolor="#008800"');
//  document.write(' bgcolor="#008800"');
  document.write(' cellspacing="0" cellpadding="5">');
  document.write('<tbody class="menu" align="left">');
  document.write('<tr><td>');
}

function start2Index()
{
  document.write('<table width="100%" border="0" align="left"');
  document.write(' background="i/navbg.gif" bgcolor="#008800"');
//  document.write(' bgcolor="#008800"');
  document.write(' cellspacing="0" cellpadding="5">');
  document.write('<tbody class="menu" align="left">');
  document.write('<tr><td>');
}



function imageLinks(pHref, pSrc, pAlt)
{

  document.write('<a href="' + pHref + '">');
  document.write('<img src="' + pSrc + '"');
  document.write(' alt="' + pAlt + '" width="150" height="40"');
  document.write(' align="left" border="0">');
  document.write('</a>');

}

function betweenRows()
{
  document.write('</td></tr>');
  document.write('<tr><td>');
}

function start3(pHref, pSrc, pAlt)
{
  imageLinks("about.html", "../i/navleftbtn-nems.png", "About NEMS");
  document.write('<br><br><br><br><br>');
  betweenRows();
  imageLinks("../index.html", "../i/navleftbtn-home.png", "Home");
  betweenRows();
  imageLinks("businesses.html", "../i/navleftbtn-businesses.png", "Local Businesses");
  betweenRows();
//  imageLinks("community.html", "../i/navleftbtn-community.png", "Local Organisations");
//  betweenRows();
  imageLinks("weather.html", "../i/navleftbtn-weather.png", "Local Weather");
  betweenRows();
  imageLinks("news.html", "../i/navleftbtn-news.png", "News Headlines");
  betweenRows();
//  imageLinks("search.html", "../i/navleftbtn-search.png", "Search the Web");
//  betweenRows();
//  imageLinks("software.html", "../i/navleftbtn-software.png", "Software Alternatives");


}

function start3Index()
{
  imageLinks("nems/about.html", "i/navleftbtn-nems.png", "About NEMS");
  document.write('<br><br><br><br><br>');
  betweenRows();
  imageLinks("index.html", "i/navleftbtn-home.png", "Home");
  betweenRows();
  imageLinks("nems/businesses.html", "i/navleftbtn-businesses.png", "Local Businesses");
  betweenRows();
//  imageLinks("nems/community.html", "i/navleftbtn-community.png", "Local Organisations");
//  betweenRows();
  imageLinks("nems/weather.html", "i/navleftbtn-weather.png", "Local Weather");
  betweenRows();
  imageLinks("nems/news.html", "i/navleftbtn-news.png", "News Headlines");
  betweenRows();
//  imageLinks("nems/search.html", "i/navleftbtn-search.png", "Search the Web");
//  betweenRows();
// imageLinks("nems/software.html", "i/navleftbtn-software.png", "Software Alternatives");

}

function start4()
{
  betweenRows();
  document.write('<br><br><br><br><br>');
  document.write('<br><br><br><br><br>');
  document.write('<br><br><br><br><br>');

  document.write('</td></tr>');
  document.write('</tbody>');
  document.write('</table>');
}

function start5Center()
{
  document.write('</td>');
  document.write('<td align="center" valign="top">');
}

function start5Left()
{
  document.write('</td>');
  document.write('<td align="left" valign="top">');
}




function structureCenter()
{
  start1();
  start2();
  start3();
  start4();
  start5Center();
}

function structureLeft()
{
  start1();
  start2();
  start3();
  start4();
  start5Left();
}

function structureIndex()
{
  start1();
  start2Index();
  start3Index();
  start4();
  start5Center();

}

function leftMenuObject()
{
  document.write('<div id="lside">');
  document.write('<object data="leftnav.html" width="160" height="600">');
  document.write('</object>');
  document.write('</div>');
}

function leftMenuObjectIndex()
{
  document.write('<div id="lside">');
  document.write('<object data="nems/leftnav.html" width="160" height="600">');
  document.write('</object>');
  document.write('</div>');
}

function structureFinish()
{
  document.write('</td>');
  document.write('</tr>');
  document.write('</table>');

//  if (navigator.userAgent.search('MSIE') == -1)
//  {
//    leftMenuObject();
//  }
}

function structureFinishIndex()
{
  document.write('</td>');
  document.write('</tr>');
  document.write('</table>');

//  if (navigator.userAgent.search('MSIE') == -1)
//  {
//    leftMenuObjectIndex();
//  }
}


/* ***********************************************  */
/* ******    END of page structure layout   ******  */
/* ***********************************************  */



//  document.write(BrowserDetect);
//  document.write('\n');


