// set the doc domain to crosswalk.com to allow writes from adserver frames
if (document.location.hostname.indexOf('crosswalk.com') != -1) 
	document.domain="crosswalk.com";

function flashad_DoFSCommand(command, args) {
	// This function is available for other actions called within the flash
	// by creating other conditions for "command".
	if (command == "h_banner") {
		argsArr = args.split("x");	
		divObj = eval('document.all.div_dropdown');
		flashWrapObj = eval('document.all.dropwrapper');
		//document.all.div_dropdown.style.clip.split(" ")[2].split("px")[0]
		expand = argsArr[0] > "60"
		if (typeof(flashWrapObj) != "undefined")
			flashWrapObj.style.zIndex = expand ? 2000 : 200;
		if (typeof(divObj)!="undefined")
			divObj.style.clip="rect(0px " + argsArr[0] + "px " + argsArr[1] + "px 0px)";
	}
}

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function FixCookieDate (date) {
	var base = new Date(0);
	var skew = base.getTime(); // dawn of (Unix) time - should be 0
	if (skew > 0)  // Except on the Mac - ahead of its time
		date.setTime (date.getTime() - skew);
}

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,expires,path,domain,secure) {
	document.cookie = name + "=" + escape (value) +
	((expires) ? ((expires.toGMTString) ? "; expires=" + expires.toGMTString() : "") : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
}

function DeleteCookie (name,path,domain) {
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

function aol_pconnURLs()
{
var anyString;
var index;
var refpage;
//Get index of the item selected
index=document.frmToolbar.cboPconn.selectedIndex;
refpage=window.parent.document.referrer;
//Using the index, get the value
anyString=document.frmToolbar.cboPconn.options[index].value;
if(anyString.substring(0,3)=="aol")
{
document.frmToolbar.target = "_top";
window.location.href = anyString;
}
else
{
window.location.href = anyString;
}
}

function aol_pconn2URLs()
{
var anyString;
var index;
var refpage;
//Get index of the item selected
index=document.frmToolbar2.cbo2Pconn.selectedIndex;
refpage=window.parent.document.referrer;
//Using the index, get the value
anyString=document.frmToolbar2.cbo2Pconn.options[index].value;
if(anyString.substring(0,3)=="aol")
{
document.frmToolbar.target = "_top";
window.location.href = anyString;
}
else
{
window.location.href = anyString;
}
}

function aol_writePCHeader()
{
	document.write('<!--------- AOL PEOPLE CONNECTION HEADER BEGINS - 585 pixel version ----------->\n');
	document.write('<table border="0" cellSpacing="0" cellPadding="0" background="http://img.crosswalk.com/aol/PC_dither.gif" width="100%" height="30"><tr><td>\n');
	document.write('<center>\n<table width="585" border="0" height="30" cellpadding="0" cellspacing="0" background="http://img.crosswalk.com/aol/PC_dither.gif">\n');
	document.write('<tbody><tr>\n<td width="250" align="left"><a href="aol://1722:peopleconnection"><img src="http://img.crosswalk.com/aol/pc_branding2.gif" ');
	document.write('width="212" height="23" border="0" hspace="3" alt="Click here to go to People Connection Main" ></a></td>\n<td align="right" valign="middle">\n');
	document.write('<table border="0"><tbody><form name="frmToolbar">\n<tr><td valign="middle">\n<select size="1" name="cboPconn">\n<option value="#">');
	document.write('Explore AOL People Connection</option>\n<option value="#">------------------------------------------</option>\n');
	document.write('<option value="aol://1722:people connection">People Connection</option>\n<option value="aol://1722:lifestyles">Lifestyles Community</option>\n');
	document.write('<option value="#">------------------------------------------</option>\n<option value="aol://1722:hometown">AOL Hometown</option>\n');
	document.write('<option value="aol://1722:liveevents">AOL Live</option>\n<option value="aol://1722:love">Love@AOL Personals</option>\n');
	document.write('<option value="aol://1722:mbsearch">Message Board Search</option>  \n<option value="#">------------------------------------------</option>\n');
	document.write('<option value="aol://1722:help">AOL Help</option>\n</select>\n</td><td valign="middle">\n<a href="javascript: aol_pconnURLs();">');
	document.write('<img width="24" border="0" height="18" alt="Go Button" src="http://img.crosswalk.com/aol/gobutton.gif"></a>\n</td></tr>\n</form>\n</tbody></table>\n');
	document.write('</td></tr>\n</tbody></table>\n</center></td></tr></table>\n<!--------- AOL PEOPLE CONNECTION HEADER ENDS - 585 pixel version ------------>');
}

function aol_writePCFooter()
{
	document.write('<center><img src="http://img.crosswalk.com/clear.gif" height="3" width="585" border="0"></center>\n');
	document.write('<!--------- AOL PEOPLE CONNECTION FOOTER BEGINS - 585 pixel version ----------->\n<table border="0" cellSpacing="0" cellPadding="0" ');
	document.write('background="http://img.crosswalk.com/aol/PC_dither.gif" width="100%" height="30"><tr><td>\n<center>\n');
	document.write('<table width="585" border="0" height="30" cellpadding="0" cellspacing="0" background="http://img.crosswalk.com/aol/PC_dither.gif">\n');
	document.write('<tbody><tr VALIGN="middle">\n<td width="250" align="left"><a href="aol://1722:peopleconnection"><img src="http://img.crosswalk.com/aol/pc_branding2.gif"  ');
	document.write('width="212" height="23" border="0" hspace="3" alt="Click here to go to People Connection Main" ></a></td>\n<td align="right" valign="middle">\n');
	document.write('<table border="0"><tbody><form name="frmToolbar2">\n<tr><td valign="middle">\n<select size="1" name="cbo2Pconn">\n<option value="#">');
	document.write('Explore AOL People Connection</option>\n<option value="#">------------------------------------------</option>\n');
	document.write('<option value="aol://1722:people connection">People Connection</option>\n<option value="aol://1722:lifestyles">Lifestyles Community</option>\n');
	document.write('<option value="#">------------------------------------------</option>\n<option value="aol://1722:hometown">AOL Hometown</option>\n');
	document.write('<option value="aol://1722:liveevents">AOL Live</option>\n<option value="aol://1722:love">Love@AOL Personals</option>\n<option value="aol://1722:mbsearch">');
	document.write('Message Board Search</option>  \n<option value="#">------------------------------------------</option>\n<option value="aol://1722:help">AOL Help</option>\n');
	document.write('</select>\n</td><td valign="middle">\n<a href="javascript: aol_pconn2URLs();"><img width="24" border="0" height="18" alt="Go Button" src="http://img.crosswalk.com/aol/gobutton.gif">');
	document.write('</a>\n</td></tr>\n</form>\n</tbody></table>\n</td></tr>\n</tbody></table>\n<center>\n</td></tr></table>');
	document.write('<!--------- AOL PEOPLE CONNECTION FOOTER ENDS - 585 pixel version ------------>');
}