 var scrnY;
 var oldColor; 
 var thisloc;
 var arrayloc;
 var uname = 'mail';
 var nameLoc = 'ashworths';
 var storeUrl; 
 var extau = 'com.au';
 var urlEmail = uname + "@" + nameLoc + "." + extau;

function loader(thePage) {
 ifrmUrl = thePage;  // ifrmUrl needed later
 window.scrollTo(0,0);
 window.frames['theFrame'].location = thePage; }

function getUrl() {
 thisloc = this.location.href;
 if (thisloc.indexOf("?addr=") != -1)
 { arrayloc = thisloc.split("?addr=");  // remove former iframe addr. if any
   thisloc = arrayloc[0]; } 
 if (thisloc.indexOf("?index=") != -1)
 { arrayloc = thisloc.split("?index=");  // remove former iframe addr. if any
   thisloc = arrayloc[0]; } 
 if (ifrmUrl != "") { thisloc = thisloc + '?addr=' + ifrmUrl; }} // ifrmUrl set above - checker or loader

function bookMarker() {
 getUrl();
 var newLink = document.anchors["bookMark"];
 newLink.setAttribute("href", thisloc);
 newLink.innerHTML = thisloc;
 document.getElementById("bmDiv").style.display = "block"; }

function emailUs(){
  var sendToEtc = 'mailto:'+urlEmail+'?subject=Web Page - '+ifrmUrl+'&body=I was looking at your web page and';
  window.open( sendToEtc ); }

function mOver(plbit) {
 oldColor = document.getElementById(plbit).style.background;
 document.getElementById(plbit).style.background = "#FF0000"; }

function mOut(plbit) {
 document.getElementById(plbit).style.background = oldColor }
 
function jumpWin(wind){
 window.open(wind,"_blank" );
 self.close(); } 
 
function printSection(thePiece) { 
 var tempTable = document.getElementById(thePiece).cloneNode(true);
 var newwindow2=window.open('',"_blank" );  
 var tmp = newwindow2.document;
 tmp.write('<html><head><title>Ashworths, Home Hill, Ph 07 4782 1177 ' + ifrmUrl + '</title>');
 tmp.write('<style type="text/css"> table { font: normal 10pt Arial,sans-serif; }'); 
 tmp.write(' @media print {input {visibility: hidden;}} </style>');
 tmp.write('</head><body><table width="760px"><tr><td>'); 
 tmp.write(' <input type="button" style="background: #44FF44; padding: 4px 8px;" value="PRINT" onclick="javascript:window.print()" />'); 
 tmp.write('&nbsp;<input type="button" style="background: #44FF44; padding: 4px 8px;" value="Close" onclick="javascript:self.close()" /><br />');  
 tmp.write( tempTable.innerHTML );
 tmp.write('</td></tr></table></body></html>'); 
 tmp.close(); }
 
function loaderInfo(thePage) {
  storeUrl = ifrmUrl;
 ifrmUrl = thePage;  // ifrmUrl needed later
 window.frames['theInfo'].location = thePage; }

function TablClose() { 
   document.getElementById('infoW').style.display = "none"; 
   ifrmUrl = storeUrl; }
