
function _goto(id, page)
{	
	var hrefPrefix = "";
	
	if(top.location.href.indexOf("forums.prospero.com") != -1) hrefPrefix = "http://www.LauraBerman.com";
	
	if (page != null)
	{	
		top.location.href = hrefPrefix + "/members/index.aspx?puid=" + id + "&p=" + page;
	}
	else
	{	
		top.location.href = hrefPrefix + "/members/index.aspx?puid=" + id;
	}
}

function _gotoAnchor(anchor)
{	
	top.location.href = "#" + anchor;
}


function _gotopop(id)
{
	var hrefPrefix = "";
	
	if(top.location.href.indexOf("forums.prospero.com") != -1) hrefPrefix = "http://www.LauraBerman.com";

	myWin = window.open(hrefPrefix + "/members/index.aspx?puid=" + id, 'myWin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=670,height=715');
}

function _gotopopheight(id,height)
{
	var hrefPrefix = "";
	
	if(top.location.href.indexOf("forums.prospero.com") != -1) hrefPrefix = "http://www.LauraBerman.com";

	myWin = window.open(hrefPrefix + "/members/index.aspx?puid=" + id, 'myWin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=670,height= + height + ');
}

function _gotopicpop(imagelocation)
{
	myWin = window.open(imagelocation, 'myWin', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=350,height=470');
}

function _gotoprint(id)
{
	myWin = window.open("/members/printview.aspx?puid=" + id, 'myWin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=680,height=715');
}

function _gotoprintnl(id, puid)
{
	myWin = window.open("/members/printview.aspx?puid=" + puid+"&issueid=" + id, 'myWin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=640,height=715');
}

//function _gotoprintnl(id)
//{
//	myWin = window.open("/members/printview.aspx?puid=403DB82C-E326-4FD6-9DE8-25A9F267D6D4&isid=" + id, 'myWin', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=640,height=715');
//}

// Rollover function
function swapImage(id, imgsrc) {
 document.getElementById(id).setAttribute('src', imgsrc);
}


// counter of the characters in textarea
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}

function hp_tips_showtab(tiptype) {

	obj_intimacy_area=document.getElementById('intimacy_area');
	obj_sex_area=document.getElementById('sex_area');
	obj_intimacy_tab=document.getElementById('intimacy_tab');
	obj_sex_tab=document.getElementById('sex_tab');

	switch(tiptype) {
		case "intimacy":
			obj_intimacy_area.style.display="block";
			obj_sex_area.style.display="none";
			obj_intimacy_tab.src="/images/members/homepage/tab_intimacytips_on.gif";
			obj_sex_tab.src="/images/members/homepage/tab_sextips_off.gif";
		break;
		case "sex":
			obj_sex_area.style.display="block";
			obj_intimacy_area.style.display="none";
			obj_sex_tab.src="/images/members/homepage/tab_sextips_on.gif";
			obj_intimacy_tab.src="/images/members/homepage/tab_intimacytips_off.gif";
		break;

	}
}

function linktomainwindow(url)
		{
			opener.location.href = url;
			window.close();
		}
