
//no spam email address
var user;
var domain;
var suffix;
function nospam(user,domain,suffix) {
	document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
}

function nospamsml(user,domain,suffix) {
	document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '" class="lnkNBlack10UL">' + user + '@' + domain + '.' + suffix + '</a>');
}

//netscape css fix

function WM_netscapeCssFix() {
   if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()

//prevents window from capture in frames

if (top.location != self.location) {
        top.location = self.location
}

//popup windows for references

function popupWindow(referenceHTML, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	windowProperties = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable'
	reference = window.open(referenceHTML, 'refName', windowProperties)
	if (parseInt(navigator.appVersion) >= 4) { reference.window.focus(); }
	}

//popup windows for calculators

function popupCalculator(mypage,myname,w,h,scroll) {
	var wi = screen.width - 100;
	var he = screen.height - 100;
	var winl = (screen.width - wi) / 2;
	var wint = ((screen.height - he) / 2) - 20;
	winprops = 'height='+he+',width='+wi+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function PrintThisPage() 
{ 
	var w = 700;
	var h = 450;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var sOption = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,resizable'
   	var sWinHTML = document.getElementById('contentarea').innerHTML; 
   	var winprint=window.open("","",sOption);
       winprint.document.open(); 
       winprint.document.write('<html><head><title>WiseInternet</title>'); 
       winprint.document.write('<link rel="stylesheet" href="http://www.tonychartres.com.au/inc/artlandishprint.css" type="text/css">'); 
       winprint.document.write('</head>'); 
       winprint.document.write('<body><a name="top"></a>'); 
       winprint.document.write('<table width="100%" "cellpadding="0" cellspacing="0"><tr><td align="left" class="txtNBlue11"><b>WiseInternet - </b><br>');
	   winprint.document.write('<a href="mailto:info@wiseinternet.com.au" class="lnkNBlue11HL">enquiries@tonychartres.com.au</a><br><br></td>');
	   winprint.document.write('<td align="right"><span class="txtNBlack10">[<a href="javascript:window.close()" class="lnkNBlack10HL">close window</a>]</span></td></tr></table>'); 
       winprint.document.write(sWinHTML);          
       winprint.document.write('</body></html>'); 
       winprint.document.close(); 
       winprint.focus(); 
}
