/* drheader.js - Common head of dr documents
*/

  <!-- Hiding the code

/* getuid.js
*/

var UserID = GetCookie('UserID');
var UserName = GetCookie('UserName');

if (document.URL.indexOf('https') > -1)      
	{
	cookiepath='/ru';
	}
else
	{
	cookiepath='/';
	}

if (document.URL.indexOf('?') > -1)
	{
	var docurlArray = document.URL.split('?');
	var qdataArray = docurlArray[1].split('&');
	for ( i = 0; i < qdataArray.length; i++)
		{
		var qdata = qdataArray[i].split('=');
//		document.write(qdata[0] + ' is ' + qdata[1] + '<br>\n');

		if ( qdata[0].indexOf('UserID') > -1)
			{
			UserID = qdata[1];
			}
		if ( qdata[0].indexOf('UserName') > -1)
			{
			UserName = qdata[1];
			UserName = UserName.replace(/%20/g, ' ');
//			document.write(UserName + '<br>\n');
			}
		}

	if ( UserID != '')
		{
/*
cookie code
*/
		var expDays = 730;
		var exp = new Date(); 
		exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
		SetCookie ('UserID', UserID, exp, cookiepath);
		SetCookie ('UserName', UserName, exp, cookiepath);
		
		}
	
	}

function getCookieVal (offset) {  
        var endstr = document.cookie.indexOf (";", offset);  
        if (endstr == -1)    
                endstr = document.cookie.length;  
                return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {  
        var arg = name + "=";  
        var alen = arg.length;  
        var clen = document.cookie.length;  
        var i = 0;  
        while (i < clen) {    
        var j = i + alen;    
        if (document.cookie.substring(i, j) == arg)      
                return getCookieVal (j);    
                i = document.cookie.indexOf(" ", i) + 1;    
                if (i == 0) break;   
        }  
        return null;
}
function SetCookie (name, value) {  
        var argv = SetCookie.arguments;  
        var argc = SetCookie.arguments.length;  
        var expires = (argc > 2) ? argv[2] : null;  
        var path = (argc > 3) ? argv[3] : null;  
        var domain = (argc > 4) ? argv[4] : null;  
        var secure = (argc > 5) ? argv[5] : false;  
        document.cookie = name + "=" + escape (value) + 
        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
        ((path == null) ? "" : ("; path=" + path)) +  
        ((domain == null) ? "" : ("; domain=" + domain)) +    
        ((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
        var exp = new Date();  
        exp.setTime (exp.getTime() - 1);  
        // This cookie is history  
        var cval = GetCookie (name);  
        document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

/* end of getuid.js
*/

  document.write(' ');

document.write('<style type="text/css"><!-- \n');
document.write('  .tab { font-family:Arial; font-size:8pt; text-decoration:underline; color:#4E3278; } \n');
document.write('  A.tab:hover { color:red; } \n');
document.write('  .pret { font-family:Times New Roman; font-size:10pt; font-variant: small-caps; text-decoration:none; color:0000dd; } \n');
document.write('  A.pret:hover { color:red; } \n');
document.write('  .pres { font-family:Times New Roman; font-size:9pt; text-decoration:none; color:0000dd; } \n');
document.write('  A.pres:hover { color:red; } \n');
document.write('--> </style> \n');

if (document.URL.indexOf('https') > -1)      
	{
	var imagebase ='https://w104.securedweb.net/duanereade/www/';
	var linkbase ='http://www.duanereade.com/';
	var linksuff = '';
	if (document.URL.indexOf('?') > -1)
		{
		var docurlArray = document.URL.split('?');
		var linksuff = '?' + docurlArray[1];
		}
	}
else
	{
	var imagebase ='';
	var linkbase ='';
	var linksuff = '';
	}

document.write('<table bgcolor="FFFFFF" width=100% cellspacing=0 cellpadding=0><tr valign="bottom"><td>\n');

document.write('	<table border=0 cellspacing=0 cellpadding=2>\n');

/*
document.write('<br>' + UserID + '<br>\n');
*/

if (UserName != "" && UserName != null && UserName != "null")
	{
document.write('	<tr align=center><td width=100% colspan=7>\n');
document.write('	<font size=-1 color=blue><b>Hi ' + UserName + ', welcome to');
document.write(' Reunions Unlimited, Inc!</b><br>(<a href="' + linkbase + 'registration.htm?UserID=notme&UserName="  target="_top">')
document.write('Click here if you are not ' + UserName + ')</a>\n');
document.write('	</font></td></tr>\n');
	}

document.write('	<tr align=center>\n');
if (document.URL.indexOf('index.htm') > -1 || document.URL.indexOf('.htm') < 0 && document.URL.indexOf('.cgi') < 0)
	{
	document.write('<td bgcolor="#CCBBE3" width=24%><font color="#4E3278" size=+1>Home</font></td>\n');
	}
else
	{
	document.write('<td bgcolor="#FDFCD0" width=24%><a href="');
	document.write(linkbase + 'index.htm' + linksuff + '" class=tab target="_top"><B>Home</b></a></td>\n');
	}
document.write('	<td width=1></td>\n');

if (document.URL.indexOf('registration.htm') > -1)      
	{
	document.write('<td bgcolor="#CCBBE3" width=24%><font color="#4E3278" size=-1><b>Registration</b></font></td>\n');
	}
else
	{
	document.write('<td bgcolor="#FDFCD0" width=24%><a href="');
	document.write(linkbase + 'registration.htm' + linksuff + '" class=tab  target="_top"><b>Registration</b></a></td>\n');
	}
document.write('	<td width=1></td>\n');

if (document.URL.indexOf('contact.htm') > -1)      
	{
	document.write('<td bgcolor="#CCBBE3" width=24%><font color="#4E3278" size=-1><b>Customer Service</b></font></td>\n');
	}
else
	{
	document.write('<td bgcolor="#FDFCD0" width=24%><a href="');
	document.write(linkbase + 'contact.htm' + linksuff + '" class=tab  target="_top"><b>Customer Service</b></a></td>\n');
	}
document.write('	<td width=1></td>\n');

document.write('	<td width=24%></td>\n');

/* Hide Extra Tab
if (document.URL.indexOf('schools.htm') > -1)      
	{
	document.write('<td bgcolor="#CCBBE3" width=24%><font color="#4E3278" size=+1>Your Class</font></td>\n');
	}
else
	{
	document.write('<td bgcolor="#FDFCD0" width=24%><a href="');
	document.write(linkbase + 'schools.htm' + linksuff + '" class=tab  target="_top"><b>Your Class</b></a></td>\n');
	}
*/

document.write('	<td width=1></td>\n');
document.write('	</tr></table>\n');
document.write('</td><td>\n');

document.write('<a href="');
document.write(linkbase + 'index.htm' + linksuff + '" target="_top"><img SRC="');
document.write(imagebase + 'images/rulogo6.gif" ALT="Reunions Unlimited, Inc. ');
document.write('Home Page" VSPACE=2 NOSAVE BORDER=0 height=50 width=320 align="right">');
document.write('</a>\n');

document.write('</td></tr>\n');
document.write('<tr><td bgcolor="#CCBBE3" colspan=2>\n');

document.write('&nbsp;\n');
/*

if (linksuff.indexOf('?') < 0)
{
document.write('<table width=100%><tr><td>\n');
document.write('<form method=post action="http://www.duanereade.com/cgibin/cart/search.cgi?user_id=id" target="_top">\n');
document.write('<input type=hidden name="database" value="allproduct.db">\n');
document.write('<font size=-1>');
document.write('<select name="2">\n');
document.write('<option value=""> (Shop by Category)\n');
document.write('<option value="">\n');
document.write('<option value="BOTTLES, ACCESSORIES, DIAPERS, FORMULA, TOILETRIES, WIPES">&GT; BABY CARE &LT;\n');
document.write('<option value="BOTTLES, ACCESSORIES">Accessories\n');
document.write('<option value="DIAPERS">Diapers\n');
document.write('<option value="FORMULA">Feeding\n');
document.write('<option value="TOILETRIES">Toiletries\n');
document.write('<option value="WIPES">Wipes\n');
document.write('<option value="">\n');

document.write('</select>\n');
document.write('<input type=hidden name="template" value="templatedr.htm">\n');
document.write('<input type="hidden" name="1_option" value="3"><input');
document.write('  type="hidden" name="2_option" value="3"><input');
document.write('  type="hidden" name="3_option" value="3">');
document.write(' <input type=hidden name="output_number" value="25"> \n');
document.write('<input type=submit value="Go">\n');
document.write('</font></form>\n');
document.write('	</td><td align=right>\n');

document.write('	<FORM METHOD="POST" ');
document.write('ACTION="http://www.duanereade.com/cgibin/jasearch.cgi" target="_top">\n');
document.write('	<INPUT TYPE="hidden" NAME="base" VALUE="/mnt/web/guide/duanereade/www">\n');
document.write('	<INPUT TYPE="hidden" NAME="dirs" VALUE=";/cart/info">\n');
document.write('	<INPUT TYPE="hidden" NAME="rbase" VALUE="http://www.duanereade.com">\n');
document.write('	<INPUT TYPE="hidden" NAME="bgcolor" VALUE="FFFFFF">\n');
document.write('	<font size=-1>Search\n');
document.write('	<SELECT NAME="searchtype">\n');
document.write('	<OPTION VALUE="content" SELECTED> Content\n');
document.write('	<OPTION VALUE="product"> Product\n');
document.write('	</SELECT>\n');
document.write('	 for <INPUT TYPE="TEXT" NAME="sv" VALUE=""> and match\n');
document.write('	<SELECT NAME="type">\n');
document.write('	<OPTION VALUE="all" SELECTED> all\n');
document.write('	<OPTION VALUE="any"> any\n');
document.write('	</SELECT> terms.\n');
document.write('	<INPUT TYPE="SUBMIT" VALUE="Search">\n');
document.write('	</font></FORM>\n');
}
*/

document.write('	</td></tr></table>\n');

if ( UserID != '' && document.URL.indexOf('https') < 0)
	{
/*
image tag code
*/
	document.write('<img src="' + linkbase + 'images/blank.gif?UserID=' + UserID +'" height=1 width=1 align=left>');
	}

document.write('</td></tr></table>\n');


  // done hiding -->





