function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//------------- Non Macromedia functions ------------------

function xDisplayDiv (obj) {
	oDiv=MM_findObj(obj);
	if (oDiv.style.display =='none')oDiv.style.display ='block';
		else oDiv.style.display ='none';
	
}

function checkFormS() {

	//Check for a word to search
	if (document.frmSiteSearch.search.value==""){
		alert("Please enter at least one keyword to search");
		document.frmSiteSearch.search.focus();

		return false;
	}
	else{
		document.frmSiteSearch.target="mainFrame";
		document.frmSiteSearch.action="siteSearch.asp";
	return true
	}
}


function resizeMain (){
// this is an important function which resizes height of the mainFrame 
// to the right size, it has to be called onload in the body tag
var MZ=(document.getElementById?true:false); 
var IE=(document.all?true:false); 
if(IE){ 
	parent.document.all.mainFrame.style.height=parent.document.frames('mainFrame').document.all.bottTable.offsetTop;
	parent.document.all.tabRow.style.height=parent.document.frames('mainFrame').document.all.bottTable.offsetTop;
	if(parent.document.all.sideFrame){
		parent.document.all.sideFrame.style.visibility='hidden';
		parent.document.all.sideFrame.style.visibility='visible';
		parent.document.all.sideFrame.style.zIndex=18;
		}
	//alert(parent.document.frames('mainFrame').document.all.bottTable.offsetTop);
	} 
else if(MZ){ 
	parent.document.getElementById('mainFrame').style.height=document.getElementById('bottTable').offsetTop;
	parent.document.getElementById('tabRow').style.height=document.getElementById('bottTable').offsetTop; 
	if(parent.document.getElementById('sideFrame')){
		parent.document.getElementById('sideFrame').style.visibility='hidden';
		parent.document.getElementById('sideFrame').style.visibility='visible';
		parent.document.getElementById('sideFrame').style.zIndex=18;
	//alert(parent.document.getElementById('mainFrame').style.height);
	}
	} 
}

function setMenuStyle(obj, cls){
	o=MM_findObj(obj);
	o.className=cls;
}

function goToURL (obj, adr){
	if (obj.className!="productMenuSet"||obj.className=='mainMenuSet') 
			{
	//	alert('A-'+obj.className+'-   -'+obj.id+'-');
		MM_goToURL('parent',adr);
		return document.MM_returnValue
		}

}
function xLogin(xobj){
	xo=MM_findObj(xobj);
	if (xo.style.display=="none")xo.style.display="block";
	else xo.style.display="none"
}

function xClOver (obj){
//pb=getDivObj(obj);
if (obj.className!='productMenuSet' || obj.className!='mainMenuSet'){
	if(obj.className=='mainMenu')obj.className='mainMenuOver';
	if(obj.className=='productMenu')obj.className='productMenuOver';

	}
}
function xClOut (obj){
if (obj.className != 'productMenuSet' || obj.className != 'mainMenuSet'){
	if(obj.className=='mainMenuOver')obj.className='mainMenu';
	if(obj.className=='productMenuOver')obj.className='productMenu';

	}
}

function popW (cont, l, t, w, h) {
var IE=(document.all?true:false);
var ua = window.navigator.userAgent.toLowerCase();

i=ua.indexOf('msie');
j=ua.indexOf('opera');
 cObj=MM_findObj(cont);
 wObjB=MM_findObj('infDivBgr');
 wObj=MM_findObj('infDiv');
 
 cObj.style.display='block';
 wObj.style.top=t+"px"
 wObj.style.left=l+"px";
 wObj.style.height=h+"px";
 wObj.style.width=w+"px";
 
// wObjB.style.top=t;
// wObjB.style.left=l;
 wObjB.style.height=h+"px";
 wObjB.style.width=w+"px";
   
 
// wObj.style.zIndex=51;

//wObjIF=MM_findObj('statusIfr');alert(wObjIF);
// wObj.style.zindex=50;
if(i==-1){ 
wObjB.className='divBgr3';
}
if(j>-1){ 
wObjB.className='divBgr3';
}
//alert(i+"  "+j +"  "+wObjB.className);
//var winl = (document.body.clientWidth / 2) - 150;
//wObj.style.left=winl;
//wObj.style.left=5;
//wObjIF.style.display='block';
wObj.style.display='block';
wObjB.style.display='block';

//MM_showHideLayers('levelStatusDiv','','show');
}
function killW(cont){
wObj=MM_findObj('infDiv');
wObjB=MM_findObj('infDivBgr');
 cObj=MM_findObj(cont);
 cObj.style.display='none';
//wObjIF=MM_findObj('statusIfr'); alert(wObjIF);
wObj.style.display='none';
wObjB.style.display='none';
//wObjIF.style.display='none';
}
function resizeSideCol(){
	a=MM_findObj('wrapMemberInfo').style.height;
	a++;a--;
	MM_findObj('wrapShopCart').style.height=290+a;
}

function hydeShowCatalog(obj){   //function to get second div object inside wrapping div - because of Netscape...
pO=getDivObj(obj);//

for(i=0;pO.childNodes.length>i;i++){
	if(pO.childNodes[i].tagName!=null && pO.childNodes[i].tagName=="DIV" && pO.tagName!="div"){
		
		if (pO.className=='divCatSubParentOpen' || pO.className=='divCatParentOpen') {
			//
			//if(pO.childNodes[i].id!=null){pO.childNodes[i].style.display='none';alert(pO.childNodes[i].style.display);}
			pO.childNodes[i].style.visibility = 'hidden';
			pO.childNodes[i].style.display='none';
			if (pO.childNodes[i].className=='divCatSub') pO.childNodes[i].className='divCatSubHide';
		}
		if (pO.className=='divCatSubParent' || pO.className=='divCatParent') {
			//if(pO.childNodes[i].id!=null)
			pO.childNodes[i].style.visibility = 'visible';
			pO.childNodes[i].style.display='block';
			if (pO.childNodes[i].className=='divCatSubHide') pO.childNodes[i].className='divCatSub';
		}
		
	}
}

if (pO.className=='divCatSubParentOpen') pO.className='divCatSubParent';
else  {if (pO.className=='divCatSubParent')pO.className='divCatSubParentOpen';}

if (pO.className=='divCatParentOpen' )pO.className='divCatParent';
else {if (pO.className=='divCatParent') pO.className='divCatParentOpen';}
//alert(pO.className);
return pO
}

function getDivObj(obj){   //function to get parent div object - because of Netscape...
op=obj.parentNode;

while (op.tagName!="DIV" && op.tagName!="div"){
	op=op.parentNode
	}
return op
}


/*  sub menu dhtml  */

function showSubMenu(){
	var objThis = this;	

	for(var i = 0; i  < objThis.childNodes.length; i++)
	{
		if(objThis.childNodes.item(i).nodeName == "UL")			
		{							
			zIdx=objThis.style.zIndex;
			objThis.childNodes.item(i).style.zIndex = (zIdx*1)+10;
			objThis.childNodes.item(i).style.display = "block";						
		}		
	}	
}

function hideSubMenu()
{								
	var objThis = this;	
	
	for(var i = 0; i  < objThis.childNodes.length; i++)			
	{
		if(objThis.childNodes.item(i).nodeName == "UL")
		{				
			objThis.childNodes.item(i).style.display = "none";			
			return;
		}			
	}	
}			

function initialiseMenu()
{
	var objLICollection = document.body.getElementsByTagName("LI");		
	for(var i = 0; i < objLICollection.length; i++)
	{		
		var objLI = objLICollection[i];										
		for(var j = 0; j  < objLI.childNodes.length; j++)
		{
			if(objLI.childNodes.item(j).nodeName == "UL")
			{
				objLI.onmouseover=showSubMenu;
				objLI.onmouseout=hideSubMenu;
				
				for(var j = 0; j  < objLI.childNodes.length; j++)
				{
					if(objLI.childNodes.item(j).nodeName == "A")
					{					
						objLI.childNodes.item(j).className = objLI.childNodes.item(j).className + " hassubmenu";								
					}
				}
			}
		}
	}
}

function setTMenu(menu){
	mnObj=MM_findObj(menu);	
	mnObj.className = "mMenuSet";
	
}

function LaunchLSAOnline()
{
window.open("https://www.loanservices.com.au/lsaonline/Log3748ForLSA554433.asp",null,"status=yes,toolbar=no,menubar=no,location=No,scrollbars=Yes,resizable=Yes,left=0,top=0");
}