
/*-----------------------------------------------
'	Company:MassMedia (www.massmedia.com.au)
'	Copyright © 2005, All rights reserved.
'	Date Created: Feburary 2005
'
'	Last Modified Date: 24th Feburary, 2005
'	Last Modified By: Benjamin -> ben@massmedia.com.au
'
'	DO NOT MODIFY THIS DOCUMENT WITHOUT
'	NOTIFYING THE AUTHOR FIRST
'
------------------------------------------------*/


// writing images to the feature section on index page
function writeFeatures(id){
    document.getElementById('featureShow').innerHTML = featureArray[id].featureText;
    document.getElementById('imageHolder').src = featureArray[id].featureImg;
    document.getElementById('imageHolder').alt = featureArray[id].imgDescription;
    document.getElementById('imageHolder').title = featureArray[id].imgDescription;
    document.getElementById('featureBtns').innerHTML = featureArray[id].featureBtns;
}

// holds id of currently visible layer
var cur_lyr;	
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "block";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "none";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_openPopUpWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features,'scrollbars=yes, status=no, resizable=no');
}

function OpenNewWindow(st_Href, nu_Width, nu_Height, st_WinName)
{ //gb
	var nu_WinWidth, nu_WinHeight, nu_WinLeftPos, nu_WinTopPos;
	nu_WinWidth = 0
	nu_WinHeight = 0
	nu_WinLeftPos = 0
	nu_WinTopPos = 0
	
	if (document.all || document.layers) 
	{
		w = screen.availWidth;
		h = screen.availHeight;
	}
	
	if (window.screen) 
	{
		nu_WinWidth = nu_Width
		nu_WinHeight = nu_Height
		nu_WinLeftPos = (w - nu_WinWidth) / 2
		nu_WinTopPos = (h - nu_WinHeight) / 2
	}

	NewWindow = window.open(st_Href, st_WinName, 'toolbar=no, scrollbars=yes, status=no, resizable=no, width='+nu_WinWidth+', height='+nu_WinHeight+', left='+nu_WinLeftPos+', top='+nu_WinTopPos);
}