if (document.images)
{
	sbb_on = new Image(); 		sbb_on.src = "/images/nav/search_btn_on.gif";
	sbb_off	= new Image(); 		sbb_off.src = "/images/nav/search_btn_off.gif";
}

function more(myPage, windowName, myWidth, myHeight, resize, scroll)
{
LeftPosition= (screen.width*0.5)-(myWidth*0.5);
TopPosition= (screen.height*0.4)-(myHeight*0.5);
return window.open(myPage, windowName, 'width='+myWidth+',height='+myHeight+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=' + resize);
}


function doLoad()
{
	// process onload events
	//if (window.location == "http://www.fhmus.com/" || window.location == "http://www.fhmus.com/default.asp")
	//	chgDynBox(4);
}

var iTb = 0;
var bRun = true;
function chgDynBox(t)
{
	if (bRun)
	{
		iTb += 1;
		if (iTb > 4) iTb = 1;
		dynBox('WebTV',1,iTb,'tabB','images/home/webtv/');
		setTimeout("chgDynBox(" + t + ")", (t * 1000));
	}
}


function mDynBox(a1, a2, a3, a4, a5)
{
	bRun = false;
	dynBox(a1, a2, a3, a4, a5);
}


	function PopDDComment()
	{
		var winCal, docCal;
		var lPos, tPos, mWidth, mHeight;
		mWidth=534;
		mHeight=460;
		lPos = (screen.width*0.5)-(mWidth*0.5);
		tPos = (screen.height*0.4)-(mHeight*0.5);

		winCal=window.open("","CommentPopper","toolbar=0,status=0,menubar=0,fullscreen=no,width="+mWidth+",height="+mHeight+",resizable=0,top="+tPos+",left="+lPos);
		docCal=winCal.document;
		
		docCal.open();
		docCal.writeln("<html><head><title>Support Your Digital Darling - FHMUS.Com</title><script type=\"text/javascript\">var winMain=window.opener; function getComm() { document.comments.ddComments.value=winMain.frmNominations.ddComments.value; }</script></head>");
		docCal.writeln("<body style=\"margin: 0px; background: #CCCCCC\"><div align=\"center\">");
		docCal.writeln("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>");
		docCal.writeln("<td style=\"width: 20px\"><img src=\"images/common/pop_t_left.gif\" alt=\"\" width=\"20\" height=\"20\" border=\"0\" /></td>");
		docCal.writeln("<td style=\"background-image: url(images/common/pop_t.gif)\"><img src=\"images/trans.gif\" alt=\"\" width=\"1\" height=\"20\" border=\"0\" /></td>");
		docCal.writeln("<td style=\"width: 20px\"><img src=\"images/common/pop_t_right.gif\" alt=\"\" width=\"20\" height=\"20\" border=\"0\" /></td>");
		docCal.writeln("</tr>");
		docCal.writeln("<tr>");
		docCal.writeln("<td style=\"background-image: url(images/common/pop_left.gif)\"><img src=\"images/trans.gif\" alt=\"\" width=\"20\" height=\"1\" border=\"0\" /></td>");
		docCal.writeln("<td><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
		docCal.writeln("<tr align=\"center\"><td style=\"background: #666666; padding: 7px 0px 7px 0px; border-bottom: 1px #FFFFFF solid\">");
		docCal.writeln("<iframe frameborder=\"0\" width=\"468\" height=\"60\" marginheight=\"0\" marginwidth=\"0\" id=\"placeAdvert\" name=\"placeAdvert\" src=\"include/adFunc.asp?iframe=1&adcode=girls&sz=468x60\" scrolling=\"no\"></iframe>");
		docCal.writeln("</td></tr>");
		docCal.writeln("<tr align=\"center\"><td>");
		docCal.writeln("<img src=\"/images/girls/digital_darlings/support_dd.jpg\" /><br /><br />");
		docCal.writeln("<div style=\"font: 14px Arial, Helvetica, sans-serif;\">Enter Your Comments:</div>");
		docCal.writeln("<form name=\"comments\" style=\"margin: 0; padding: 0;\">");
		docCal.writeln("<textarea name=\"ddComments\" style=\"width: 422px; height: 200px;\"></textarea><br><input style=\"margin: 8px 0 8px 0;\" type=\"button\" name=\"Submit\" value=\"Save Comment\" onclick=\"winMain.frmNominations.ddComments.value=document.comments.ddComments.value; window.close();\">");
		docCal.writeln("</form>");
		docCal.writeln("</td></tr>");
		docCal.writeln("</table></td>");
		docCal.writeln("<td style=\"background-image: url(images/common/pop_right.gif)\"><img src=\"images/trans.gif\" alt=\"\" width=\"20\" height=\"1\" border=\"0\" /></td>");
		docCal.writeln("</tr>");
		docCal.writeln("<tr>");
		docCal.writeln("<td style=\"width: 20px\"><img src=\"images/common/pop_b_left.gif\" alt=\"\" width=\"20\" height=\"30\" border=\"0\" /></td>");
		docCal.writeln("<td style=\"background-image: url(images/common/pop_b.gif); height: 30px\" valign=\"bottom\" align=\"center\"></td>");
		docCal.writeln("<td style=\"width: 20px\"><img src=\"images/common/pop_b_right.gif\" alt=\"\" width=\"20\" height=\"30\" border=\"0\" /></td>");
		docCal.writeln("</tr></table>");
		docCal.writeln("</div><script>getComm();</script></body></html>");
	}


function rov_td(obj, tdBG)
{
	obj.style.background = tdBG;
}

function rov_class(obj, clsName)
{
	obj.className = clsName;
}

function curl(url)
{
	window.location = url;
}

function regex_email(addr)
{
	return regex_check(addr, "^([\\w\\.\\+\\-]+)@(([a-zA-Z0-9]+[a-zA-Z0-9\\-]*[a-zA-Z0-9]+)\\.)+([a-zA-Z]{2,6})$");
}

function regex_check(string, pattern)
{
	if (string != null && pattern != null)
	{
		var re = new RegExp(pattern);
		return string.match(re) != null;
	}
	else
		return false;
}

function age(bDay){
	var c = new Date(); var b = new Date(bDay); var y;
	if (bDay == ((b.getMonth()+1) + "/" + b.getDate() + "/" + (b.getYear()+1900)))
		y = Math.floor((c.getTime() - b.getTime()) / (365.24 * 24 * 60 * 60 * 1000));
	else
		y = -1;
	return y;
}


function rotImg(imgName, state) {
	if (document.images)
		if (isDefined(imgName + "_" + state))
			document.getElementById(imgName).src = eval(imgName + "_" + state + ".src");
}

function isDefined( variable)
{
    return (typeof(window[variable]) == "undefined")?  false: true;
}


function launch_comm_link(i) { launch_comm_link_h2(i, location.href, document.title); return false; }

function launch_comm_link_h1(i, u) { launch_comm_link_h2(i, u, document.title); return false; }

function launch_comm_link_h2(i, u, t) {
	var dt = [];

	dt[0] = "http://www.facebook.com/share.php?u=<$PAGE_URL$>";
	dt[1] = "http://del.icio.us/post?v=4&noui&jump=close&url=<$PAGE_URL$>&title=<$PAGE_TITLE$>";
	dt[2] = "http://digg.com/submit?phase=2&url=<$PAGE_URL$>&title=<$PAGE_TITLE$>";
	dt[3] = "http://reddit.com/submit?url=<$PAGE_URL$>&title=<$PAGE_TITLE$>";
	dt[4] = "http://www.stumbleupon.com/submit?url=<$PAGE_URL$>&title=<$PAGE_TITLE$>";
	dt[5] = "http://cgi.fark.com/cgi/fark/edit.pl?new_url=<$PAGE_URL$>&new_comment=<$PAGE_TITLE$>";
	dt[6] = "http://www.furl.net/store?s=f&to=0&ti=<$PAGE_TITLE$>&u=<$PAGE_URL$>";

	var nl = dt[i];
	nl = nl.replace("<$PAGE_URL$>", encodeURIComponent(u));
	nl = nl.replace("<$PAGE_TITLE$>", encodeURIComponent(t));
	window.open(nl);

	return false;
}
