var popUpHTM=0;
function popUpHTML(URLStr)
{
  if(popUpHTM)
  {
    if(!popUpHTM.closed) popUpHTM.close();
  }
  popUpHTM = open(URLStr, 'popUpHTM', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+670+',height='+300+',left='+200+', top='+150+'');
}
PositionX = 0;
PositionY = 0;
defaultWidth  = 920;
defaultHeight = 700;
var AutoClose = true;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=( navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
else close(); 
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY; 
var optIE='scrollbars=no,width=160,height=100,left='+PositionX+',top='+PositionY;

function popImage(imageURL){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('1-866-731-8378','',optIE);} 
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt( navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln(' window.resizeTo(100,100);');
writeln('width=document.images[0].width + 25;//100-(document.body.clientWidth-document.images[0].width-25);');
//writeln('alert(document.images[0].src);');
//writeln('height=100-(document.body.clientHeight-document.images[0].height-60);');
writeln('height=document.images[0].height+120;');
//writeln('alert(width)');
writeln('window.resizeTo (width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=25+document.images["rn"].width;');writeln('window.innerHeight=85+document.images["rn"].height;}}');
writeln('function doTitle(){ document.title="DreamLine - Bathauthority.com";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=#002428 scroll="no" onload="reSizeToImage();doTitle();self.focus()">') 
<!-- Hide from old browsers
else writeln('</head><body bgcolor=ffffff scroll="no" onload="reSizeToImage();doTitle();self.focus()">');
writeln('<table border = 0 width = 100% height = 100%><tr><td align = center valign = center><img name="rn" src='+imageURL+' style="display:block"><br><a href = "javascript: window.close();"><img border = 0 src = http://www.bathauthority.com/images/Close2.gif></a> &nbsp; &nbsp; <a href = "javascript: window.print();"><img border = 0 src = http://www.bathauthority.com/images/print2.gif></a></td></tr></table></body></html>' ); 
close(); 
};}
function TellFriend(){
PositionX = 0;
PositionY = 0;
defaultWidth  = 400;
defaultHeight = 500;
var AutoClose = true;
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=( navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
else close(); 
var optNN='status=yes,scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY; 
var optIE='status=yes,scrollbars=yes,width=400,height=500,left='+PositionX+',top='+PositionY;

var pageref = location.href;
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);} 
with (imgWin.document){
writeln('<html><head><title>Loading...</title>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt( navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function doTitle(){ document.title="BathAuthority Email Form";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body leftmargin = "0" topmargin = "0" bgcolor=ffffff scroll="no" onload="doTitle();self.focus()">') 
else writeln('</head><body leftmargin = "0" topmargin = "0" bgcolor=ffffff scroll="no" onload="doTitle();self.focus()">');
writeln('<img src = "http://www.bathauthority.com/images/popup-header.jpg"><form method="POST" action="http://www.bathauthority.com/scripts/mail.php"><table width = "395" cellspacing = "5"><tr><td colspan = 2><font size="2" color="#314053" face="Arial, Helvetica, sans-serif">Want someone else to see this site? Use this form to send this page as a link and they will receive it immediately. Send it to several places/people by separating the email addresses with commas.</font></td></tr><tr>   <td><div align="right"><font size="2" color="#314053" face="Arial, Helvetica, sans-serif">Friends email</font></div></td><td><input type="text" size = "40" name="_recipients" id = "_recipients"></td>    <tr><td><div align="right"><font color="#314053" size="2" face="Arial, Helvetica, sans-serif">Subject</font></div></td><td><input type="Text" name="_subject" id = "_subject" size = "40" value="Take a look at this web page"></td></tr><tr><td><div align="right"><font color="#314053" face="Arial, Helvetica, sans-serif" size="2">Your Name</font></div></td><td><input name="realname" id = "realname" type="TEXT" size=40></td></tr><tr><td><div align="right"><font color="#314053" face="Arial, Helvetica, sans-serif" size="2">Your E-mail</font></div></td><td><input name="_replyTo" id = "_replyTo" type="TEXT" size=40></td></tr><tr><td colspan = 2><font size="2" color="#314053" face="Arial, Helvetica, sans-serif">Message<input type = "hidden" id = "_redirect" name = "_redirect" value = "http://www.bathauthority.com/thanks.asp"></font></p><p><textarea name="_body" type="TEXT" rows=6 cols=45 align="left" wrap="physical">Thought this website could be of interest to you.</textarea>');
writeln('<input type="hidden" name="hrefref" value="'+pageref+'">');
writeln('<p><input src = "http://www.bathauthority.com/images/submit.gif" name="Submit" id = "Submit" type="image" value="Submit">&nbsp; &nbsp;<a href = "javascript:window.close();"><img border = "0" src = "http://www.bathauthority.com/images/Close2.gif"></a></td></tr></table></form></body></html>');
close(); };}
// -- End Hiding Here --> 
function getRefToDivMod( divID, oDoc ) {
  if( !oDoc ) { oDoc = document; }
  if( document.layers ) {
    if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
      for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
        y = getRefToDivMod(divID,oDoc.layers[x].document); }
      return y; } }
  if( document.getElementById ) { return oDoc.getElementById(divID); }
  if( document.all ) { return oDoc.all[divID]; }
  return document[divID];
}

function openPerfectPopup(oW,oTitle,oContent) {
  var x = window.open('','windowName','width=500,height=400,resizable=1');
  if( !x ) { return true; }
  x.document.open();
  x.document.write('<html><head><title>'+oTitle+'<\/title><\/head><body>'+
    (document.layers?('<layer left="0" top="0" width="'+oW+'" id="myID">')
      :('<div style="position:absolute;left:0px;top:0px;display:table;width:'+oW+'px;" '+
      'id="myID">'))+
    oContent+(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');
  x.document.close();
  var oH = getRefToDivMod( 'myID', x.document ); if( !oH ) { return false; }
  var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; }
  x.resizeTo( oW + 200, oH + 200 );
  var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;
  if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }
  else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }
  else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }
  if( window.opera && !document.childNodes ) { myW += 16; }
  x.resizeTo( oW + ( ( oW + 200 ) - myW ), oH + ( (oH + 200 ) - myH ) );
  if( x.focus ) { x.focus(); }
  return false;
}

function gogogo()
{
	var a = window.open('','','width=650,height=600,scrollbars=yes');
	a.document.open("text/html");
	a.document.write('<html><head><link rel="stylesheet" href="http://www.bathauthority.com/scripts/bathauthorityStyles.css" /><style type="text/css">.info1 td{text-align: left;color: #000000;border: solid 1px #cccccc;}h1{color:#000000;}</style></head><body style="padding-left:20px;background-image:none;background-color:#FFFFFF;">');

	a.document.write(document.getElementById('print1').innerHTML);
	a.document.close();
	a.print();
}
var popUpWin=0;
function popUpWindow(URLStr)
{
if(popUpWin)
 {
    if(!popUpWin.closed) popUpWin.close();
}
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+700+',height='+600+',left='+20+', top='+0+'');
}
function  myLeft(str)
{
	str=''+str+'';
	var tmp = str.indexOf("?");
	if(tmp != -1)
	{
		return str.substring(0, tmp);
	}
	else
	{
		return str;
	}
}
function repTextParam(str)
{
str=str.replace(";"," ");
str=str.replace("?"," ");
str=str.replace("'"," ");
str=str.replace("&"," ");
str=str.replace('"',' ');
str=str.replace(/[^A-Za-z0-9]/g,'');

return str;
}

function formInfo()
{ 
	
	//var addr='http://luxstores.com/chat/offline.php?info='+myLeft(escape(document.location));
	var addr='http://Bathauthority.com/offline.php?info='+escape(repTextParam(document.title));

return addr;
}

