
function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();
//alert("browser Object is created")
function browserWidth() {
   if (self.innerWidth) {
	return self.innerWidth;
   } else if (document.documentElement && document.documentElement.clientWidth) {
	return document.documentElement.clientWidth;
   } else if (document.body) {
	return document.body.clientWidth;
   }
   return 630;
}

function browserHeight() {
   if (self.innerWidth) {
	return self.innerHeight;
   } else if (document.documentElement && document.documentElement.clientWidth) {
	return document.documentElement.clientHeight;
   } else if (document.body) {
	return document.body.clientHeight;
   }
   return 470;}
function CloseMe()
{
		 document.getElementById('alertDiv').style.display='none';
		window.top.hidePopWin();

	
	//	document.getElementById('alertDiv').style.visibility='hidden';
	  
		
	
}

function RegistrationMessageBox(message,width,level) {
initPopUp();
showPopWin();
var errorTitle = "";

if (level == 1)
{
		errorTitle = "Oops! We cannot process your request. Please review the following section(s):<br />Did you...";
}
else if (level == 2)
{
		errorTitle = "Oops! We cannot process your request. Please review the following section(s):";
}


var msgBox = "";

msgBox += '<table width="292" border="0" align="center" cellpadding="0" cellspacing="0">';
msgBox += '<tr><td><table width="292" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><img src="../images/left_top.gif" width="10" height="26" /></td>';
msgBox += '<td width="100%" background="../images/top_bg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td width="100%" class="txtblk11"><b>Error Page</b></td><td style="padding-right:5px;"><img src="../images/btn_close2.gif" style="cursor:pointer;" onclick="CloseMe();" width="28" height="15"  /></td></tr></table></td>';
msgBox += '<td><img src="../images/right_top.gif" width="10" height="26" /></td></tr></table></td>';
msgBox += '</tr><tr><td><table width="292" border="0" cellspacing="0" cellpadding="0"><tr><td background="../images/left_bg.gif"><img src="../images/spacer.gif" width="3" height="1" /></td>';
msgBox += '<td width="100%" align="left" valign="top" background="../images/white_bg.gif"  style="background-repeat:repeat; background-color:#FFFFFF;"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td style="padding:12px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="left" valign="top"><img src="../images/error_img.gif"  /></td>';
msgBox += '<td width="100%" valign="top" style="padding-left:5px;" class="txtblk10">'+errorTitle+'<br /><br /><span class="txtred10">'+message+'</span></td></tr>';
msgBox += '</table></td></tr><tr><td height="40" align="right" bgcolor="#F0F0F0" style="padding-right:10px;"><img src="../images/txt_btn_ok.gif" width="88" height="26" style="cursor:pointer;" onclick="CloseMe();" /></td>';
msgBox += '</tr></table></td>';
msgBox += '<td background="../images/right_bg.gif"><img src="../images/spacer.gif" width="3" height="1" /></td>';
msgBox += '</tr></table></td></tr>';
msgBox += '<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../images/bot_left.gif" width="3" height="3" /></td>';
msgBox += '<td width="100%"  background="../images/bottom_bg.gif"><img src="../images/spacer.gif" width="1" height="3" /></td><td><img src="../images/bot_right.gif" width="3" height="3" /></td>';
msgBox += '</tr></table></td></tr></table>';

			
		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
	
}

function lower_waiste() {

width = 400;
initPopUp();
showPopWin();
var msgBox = "";

msgBox += '<table width="574" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td height="250" align="left" valign="top" background="../images/uj_lowerwaist_popup_bg.png">';
msgBox += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td  style="padding:23px 0px 0px 19px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td><img src="../images/uj_lw_popup_pdt_uj.gif" alt="UnderJams LowWaist" title="UnderJams LowWaist" width="173" height="181" /></td>';
msgBox += '<td><img src="../images/uj_lw_popup_pdt_gd.gif" alt="GoodNites&reg; Underpants" title="GoodNites&reg; Underpants" width="174" height="181" /></td>';
msgBox += '</tr></table></td></tr><tr>';
msgBox += '<td style="padding:5px 0px 0px 43px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td><img src="../images/arrow.gif" width="18" height="19" /></td>';
msgBox += '<td width="100%" style="padding-left:5px;">';
msgBox += '<a href="../bedwetting-children/free_sample.php" target="_blank" class="txtbfree"   alt="See for yourself with a FREE sample" title="See for yourself with a FREE sample">';
msgBox += 'See for yourself with a FREE sample</a> </td></tr></table></td></tr></table></td>';
msgBox += '<td width="100%" align="left" valign="top" style="padding-top:18px;"><table width="195" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td align="right" valign="top" class="txtblk14" style="padding-right:16px;">2. LowWaist</td>';
msgBox += '<td style="padding-top:5px;"><img src="../images/btn_close.gif" style="cursor:pointer;" onclick="CloseMe();" alt="Close" title="Close" width="29" height="27" /></td>';
msgBox += '</tr></table></td></tr><tr>';
msgBox += '<td align="center" valign="top" class="txtblk14n" style="padding-top:18px;">Privacy can mean the world when you&rsquo;re in the middle <br />';
msgBox += 'of a pillow  fight. That&rsquo;s why UnderJams was designed to fit more like underwear than GoodNites&reg; Underpants.</td>';
msgBox += '</tr></table></td></tr></table></td></tr></table>';

		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
	
}


function night_lock() {

width = 400;
initPopUp();
showPopWin();
var msgBox = "";

msgBox += '<table width="443" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td height="277" align="left" valign="top" background="../images/uj_nightLock_popup_bg.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td height="48" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td class="txtblk14" style="padding:28px 0px 0px 28px;">1. NightLock&trade;</td>';
msgBox += '<td align="right" valign="top" style="padding:17px 30px 0px 0px;">';
msgBox += '<a href="#"  alt="Close" onclick="CloseMe();" title="Close"><img src="../images/btn_close.gif" style="cursor:pointer;"   width="28" height="28" border="0" /></a></td>';
msgBox += '</tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td width="26" align="left" valign="top"></td>';
msgBox += '<td><img src="../images/uj_pdtfe_nightlock.gif" width="385" height="138" alt="UnderJams NightLock absorbency" title="UnderJams NightLock absorbency"/></td>';
msgBox += '<td width="32" align="left" valign="top"></td></tr></table></td></tr><tr>';
msgBox += '<td align="left" valign="top" class="txtblk14n" style="padding:11px 0px 0px 30px;">';
msgBox += 'The absorbency tested UnderJams&trade; core absorbs <br />and locks away fluids to help prevent leaks.</td>';
msgBox += '</tr><tr><td align="center" valign="top" style="padding-top:12px;"><table width="286" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><img src="../images/arrow.gif" width="18" height="19" /></td>';
msgBox += '<td width="258" style="padding-left:9px;">';
msgBox += '<a href="../bedwetting-children/free_sample.php" class="txtbfree" alt="See for yourself with a FREE sample" title="See for yourself with a FREE sample" target="_blank">';
msgBox += 'See for yourself with a FREE sample</a></td>';
msgBox += '</tr></table></td></tr></table></td></tr></table>';

	
		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
	

}

function comfort_wear() {
width = 400;
initPopUp();
showPopWin();
var msgBox = "";

msgBox += '<table width="490" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td height="258" align="center" valign="top" background="../images/uj_confortwear_popup_bg.png">';
msgBox += '<table width="445" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td style="padding-top:15px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td align="left" valign="top" class="txtblk14">3. ComfortWear</td>';
msgBox += '</tr><tr><td align="right" valign="top">';
msgBox += '<img src="../images/uj_confortwear.gif" width="381" height="134" alt="UnderJams ComfortWear" title="UnderJams ComfortWear"/></td>';
msgBox += '</tr><tr><td align="center" valign="top" class="txtblk14n" style="padding:8px 0px 0px 35px;">';
msgBox += 'Made  from soft, breathable material, UnderJams helps your special boy feel  comfortable just being a kid.</td>';
msgBox += '</tr><tr><td style="padding:8px 0px 0px 35px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><img src="../images/arrow.gif" width="18" height="19" /></td>';
msgBox += '<td width="100%" align="left" style="padding-left:10px;">';
msgBox += '<a href="../bedwetting-children/free_sample.php" class="txtbfree" alt="See for yourself with a FREE sample" title="See for yourself with a FREE sample" target="_blank">';
msgBox += 'See for yourself with a FREE sample</a></td></tr></table></td></tr></table></td>';
msgBox += '<td align="left" valign="top" style="padding-top:8px;">';
msgBox += '<img src="../images/btn_close.gif" onclick="CloseMe();" style="cursor:pointer;" width="29" height="27" alt="Close" title="Close"/></td>';
msgBox += '</tr></table></td></tr></table></td></tr></table>';

	
		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
}



// For GIRLS

function night_lock_girls() {

width = 400;
initPopUp();
showPopWin();
var msgBox = "";

msgBox += '<table width="443" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td height="277" align="left" valign="top" background="../images/uj_nightLock_popup_bg.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td height="48" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td class="txtblk14" style="padding:28px 0px 0px 28px;">1. NightLock&trade;</td>';
msgBox += '<td align="right" valign="top" style="padding:17px 30px 0px 0px;">';
msgBox += '<a href="#"  alt="Close" onclick="CloseMe();" title="Close"><img src="../images/btn_close.gif" style="cursor:pointer;"   width="28" height="28" border="0" /></a></td>';
msgBox += '</tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td width="26" align="left" valign="top"></td>';
msgBox += '<td><img src="../images/uj_pdtfe_nightlock.gif" width="385" height="138" alt="UnderJams NightLock absorbency" title="UnderJams NightLock absorbency"/></td>';
msgBox += '<td width="32" align="left" valign="top"></td></tr></table></td></tr><tr>';
msgBox += '<td align="left" valign="top" class="txtblk14n" style="padding:11px 0px 0px 30px;">';
msgBox += 'The absorbency tested UnderJams&trade; core absorbs <br />and locks away fluids to help prevent leaks.</td>';
msgBox += '</tr><tr><td align="center" valign="top" style="padding-top:12px;"><table width="286" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><img src="../images/arrow.gif" width="18" height="19" /></td>';
msgBox += '<td width="258" style="padding-left:9px;">';
msgBox += '<a href="../bedwetter/free-sample.php" class="txtbfree" alt="See for yourself with a FREE sample" title="See for yourself with a FREE sample" target="_blank">';
msgBox += 'See for yourself with a FREE sample</a></td>';
msgBox += '</tr></table></td></tr></table></td></tr></table>';

	
		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
	

}


function comfort_wear_girls() {
width = 400;
initPopUp();
showPopWin();
var msgBox = "";

msgBox += '<table width="490" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td height="258" align="center" valign="top" background="../images/uj_confortwear_popup_bg.png">';
msgBox += '<table width="445" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td style="padding-top:15px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td align="left" valign="top" class="txtblk14">3. ComfortWear</td>';
msgBox += '</tr><tr><td align="right" valign="top">';
msgBox += '<img src="../images/uj_confortwear.gif" width="381" height="134" alt="UnderJams ComfortWear" title="UnderJams ComfortWear"/></td>';
msgBox += '</tr><tr><td align="center" valign="top" class="txtblk14n" style="padding:8px 0px 0px 35px;">';
msgBox += 'Made  from soft, breathable material, UnderJams helps your special girl feel  comfortable just being a kid.</td>';
msgBox += '</tr><tr><td style="padding:8px 0px 0px 35px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><img src="../images/arrow.gif" width="18" height="19" /></td>';
msgBox += '<td width="100%" align="left" style="padding-left:10px;">';
msgBox += '<a href="../bedwetter/free-sample.php" class="txtbfree" alt="See for yourself with a FREE sample" title="See for yourself with a FREE sample" target="_blank">';
msgBox += 'See for yourself with a FREE sample</a></td></tr></table></td></tr></table></td>';
msgBox += '<td align="left" valign="top" style="padding-top:8px;">';
msgBox += '<img src="../images/btn_close.gif" onclick="CloseMe();" style="cursor:pointer;" width="29" height="27" alt="Close" title="Close"/></td>';
msgBox += '</tr></table></td></tr></table></td></tr></table>';

	
		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
}


function lower_waiste_girls() {

width = 400;
initPopUp();
showPopWin();
var msgBox = "";

msgBox += '<table width="574" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td height="250" align="left" valign="top" background="../images/uj_lowerwaist_popup_bg.png">';
msgBox += '<table width="100%" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td  style="padding:23px 0px 0px 19px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td><img src="../images/uj_lw_popup_pdt_uj.gif" alt="UnderJams LowWaist" title="UnderJams LowWaist" width="173" height="181" /></td>';
msgBox += '<td><img src="../images/uj_lw_popup_pdt_gd.gif" alt="GoodNites&reg; Underpants" title="GoodNites&reg; Underpants" width="174" height="181" /></td>';
msgBox += '</tr></table></td></tr><tr>';
msgBox += '<td style="padding:5px 0px 0px 43px;"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td><img src="../images/arrow.gif" width="18" height="19" /></td>';
msgBox += '<td width="100%" style="padding-left:5px;">';
msgBox += '<a href="../bedwetter/free-sample.php" target="_blank" class="txtbfree"   alt="See for yourself with a FREE sample" title="See for yourself with a FREE sample">';
msgBox += 'See for yourself with a FREE sample</a> </td></tr></table></td></tr></table></td>';
msgBox += '<td width="100%" align="left" valign="top" style="padding-top:18px;"><table width="195" border="0" cellspacing="0" cellpadding="0">';
msgBox += '<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
msgBox += '<td align="right" valign="top" class="txtblk14" style="padding-right:16px;">2. LowWaist</td>';
msgBox += '<td style="padding-top:5px;"><img src="../images/btn_close.gif" style="cursor:pointer;" onclick="CloseMe();" alt="Close" title="Close" width="29" height="27" /></td>';
msgBox += '</tr></table></td></tr><tr>';
msgBox += '<td align="center" valign="top" class="txtblk14n" style="padding-top:18px;">Privacy can mean the world when you&rsquo;re in the middle <br />';
msgBox += 'of a pillow  fight. That&rsquo;s why UnderJams was designed to fit more like underwear than GoodNites&reg; Underpants.</td>';
msgBox += '</tr></table></td></tr></table></td></tr></table>';

		document.getElementById('alertDiv').style.display = '';
		document.getElementById('alertDiv').style.top=((browserHeight()/2)-200)+'px';
		document.getElementById('alertDiv').style.left=((browserWidth()/2)-(width/2))+'px';
		document.getElementById('alertDiv').style.visibility='visible';
		document.getElementById('alertDiv').innerHTML=msgBox;
	
}

