/*
NOTE: getHostName() and openDIY() appear in both menu.js and header.js. Ensure both places are updated.
*/
function getHostName() {
	 var HOST_NAME = "www.maxisloans.com.au";	 
	 var rtn_host_name;
	 var win_host_name = window.top.location.hostname;
          
    // if it is an external request - direct user to maxisloans.com.au             
    if (win_host_name) {  
       if (win_host_name.toUpperCase().indexOf("MAXISLOANS.COM") ==  -1) 
       	rtn_host_name = win_host_name.toLowerCase();
      else 
       	rtn_host_name = HOST_NAME;                   
     } 
	return rtn_host_name;

}	

function openDIY() {
	
        var loginWin;

        if ((screen.Height >=0) && (screen.Width >=0))
        {
                var sWidth = screen.Width - 10;
                var sHeight = screen.Height - 55;
        }
        else if ((screen.availHeight >= 0) && (screen.availWidth >= 0))
        {
                var sHeight = screen.availHeight - 25;
                var sWidth = screen.availWidth - 10;
        }
        sOptions = "toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=yes,";
        sOptions = sOptions + "resizable=yes,screenX=0,screenY=0,left=0,top=0,";
        sOptions = sOptions + "height=" + sHeight + ",width=" + sWidth;        
		  sLoc = "http://" + getHostName() + "/diylogin.html";
	     sTitle = "Maxis_Loans_Internet_Access";
        loginWin = window.open(sLoc,sTitle,sOptions);
}

document.write('<div id="banner">');
document.write('<div id="bannerleft">');
//document.write('	<img id="logo" src="/images/maxis_logo.gif" alt="maxis loans - putting people first">');
document.write('</div>');
document.write('<div id="bannermiddle">');
document.write('	<img id="arrow" src="/images/banner_arrow.gif">');
document.write('</div>');
document.write('<div id="bannerright">');
document.write('	<img id="arrow" src="/images/banner_arrow_slice.gif">');
document.write('</div>');
document.write('<div id="bannerbar">');
document.write('	<h6><a href="javascript:openDIY()">INTERNET ACCESS LOGIN</a> | <a href="/aboutsite.html">SITEMAP</a> | <a href="/contact.html">CONTACT MAXIS</a></h6>');
document.write('</div>');
document.write('</div>');


