var newWin
var anotherWin
var iShow = 0
var sServer

function closeWindow()
{
	if (newWin && !newWin.closed)
		newWin.close()

	if (anotherWin && !anotherWin.closed)
		anotherWin.close()
}
	
function goSpinSheet()
{
	newWin = window.open("http://206.113.51.139/Weather/weather.php","SpinSheet","status, height=500, width=660, scrollbars, resizable")
}

function goWeather()
{
	newWin = window.open("http://www.weather.com","Weather","status, height=500, width=660, scrollbars, resizable")
}

function goJWorld()
{
	newWin = window.open("http://www.sailjworld.com","JWorld","status, height=500, width=660, scrollbars, resizable")
}

function goRegister()
{
	newWin = window.open("/news/register.asp","Registration","status, height=500, width=750, resizable, scrollbars")
}

function goMember()
{
	window.location.href = "/auth/login.asp?RP=/default.asp"
}

function goLogout()
{
	window.location.href = "/auth/logout.asp?RP=/default.asp"
}

function goDemoSail(sType)
{
	if (sType == "email")
	{
		newWin = window.open("http://jport.pagequest.com/members/sign_up.asp?Context=" + sType,"Demo","status, toolbar, resizable, height=365, width=660, scrollbars")
	}
	else
	{
		newWin = window.open("http://jport.pagequest.com/members/sign_up.asp?Context=" + sType,"Demo","status, toolbar, resizable, height=500, width=660, scrollbars")
	}
}

function goDemoBoat()
{
	newWin = window.open("http://jport.pagequest.com/members/sign_up.asp?RP=/c_club/default.asp?NC=66&SEC=c_club","Demo","status, toolbar, resizable, height=500, width=660, scrollbars")
}

function goList(iBoat)
{
	newWin = window.open("/brokerage/boatspec.asp?id=" + iBoat,"Brokerage","status, resizable, height=500, width=660, scrollbars")
}

function goModel(iBoat)
{
	newWin = window.open("/brokerage/boatspec.asp?model=" + iBoat,"Brokerage","status, resizable, height=500, width=660, scrollbars")
}

function goVisit(sArticle)
{
	newWin = window.open(sArticle,"Visit","status, height=500, width=660, scrollbars, resizable")
}

function goWindow(sArticle)
{
	anotherWin = window.open(sArticle,"Window","status, height=500, width=660, scrollbars, resizable")
}

function goNews(iArticle)
{
	newWin = window.open("/news/Article.asp?id=" + iArticle,"Article","status, height=500, width=660, scrollbars, resizable")
}

function goArchives(sType, sList, sSection)
{
	newWin = window.open("/news/Archive.asp?type=" + sType + "&section=" + sSection + "&list=" + sList,"Archive","status, height=500, width=660, scrollbars, resizable")
}

function goNotices()
{
	newWin = window.open("/news/Notice.asp","Notices","status, height=500, width=700, scrollbars, resizable")
}

function goMapQuest()
{
	newWin = window.open("http://www.mapquest.com/directions/main.adp?go=1&do=nw&ct=NA&1y=US&1a=&1p=&1c=&1s=&1z=&2y=US&2a=213+Eastern+Ave&2p=&2c=Annapolis&2s=MD&2z=21403&lr=2&x=0&y=0","MapQuest","status, height=500, width=660, scrollbars, resizable")
}

function goGuides()
{
	newWin = window.open("/j_club/guidelines.asp","Guidelines","status, toolbar, resizable, height=500, width=560, scrollbars, resizable")
}

function goMemberInfo()
{
	newWin = window.open("/j_club/memberinfo.asp","MemberInfo","status, toolbar, resizable, height=500, width=560, scrollbars, resizable")
}

function goFleet(sType)
{
	newWin = window.open("/j_club/fleet.asp?type=" + sType,"Fleet","status, height=500, width=660, scrollbars, resizable")
}

function goSpec(sJBoat)
{
	newWin = window.open(sJBoat + ".asp","JSpecs","status, height=500, width=600, scrollbars, resizable")
}

function goDownload()
{
	newWin = window.open("/j_club/scdownload.asp","Download","status, height=500, width=660, scrollbars, resizable, toolbar")
}

function goBCDownload()
{
	newWin = window.open("/c_club/bcdownload.asp","Download","status, height=500, width=660, scrollbars, resizable, toolbar")
}

function goJBoats()
{
	newWin = window.open("http://www.jboats.com/","JBoats","status, height=500, width=660, scrollbars, resizable")
}

function goMJM()
{
	newWin = window.open("http://www.mjmyachts.com/","CBoats","status, resizable, height=500, width=660, scrollbars")
}

function goG20()
{
	newWin = window.open("http://www.gboats.com/","GBoats","status, resizable, height=500, width=660, scrollbars")
}

function goBoats(sBoat)
{
	newWin = window.open("http://" + sBoat,"JBoats","status, height=500, width=660, scrollbars, resizable")
}

function go30Reasons()
{
	newWin = window.open("http://www.jboats.com/30reasons.htm","Reasons","status, height=500, width=660, scrollbars, resizable")
}

function goFaq(sArticle, sLink)
{
	newWin = window.open("/" + sArticle + "/faq.asp#" + sLink, "FAQ", "status, toolbar, height=500, width=660, scrollbars, resizable")
}

function showMember(sId)
{
	newWin = window.open("look_user.asp?id=" + sId,"newWin","status, height=400, width=460, scrollbars, resizable")
}

function goUrl(sUrl)
{
	newWin = window.open(sUrl,"newWin","status, height=500, width=660, scrollbars, resizable")
}

function open_window(sUrl)
{
	newWin = window.open(sUrl,"newWin","status, height=500, width=660, scrollbars, resizable")
}

function changeUrl(sUrl)
{
	window.opener.location.href = sUrl
}

function goMain(sPage)
{
	window.opener.location.href = sPage + ".asp"
	window.close()
}

function goPrint()
{
	window.print()
}

function goBack()
{
	window.history.back()
}

function goGallery(iId)
{
	document.location.href = "/news/gallerynews.asp?id=" + iId
}

function goViewPic(sPic)
{
	newWin = window.open("/news/ViewPic.asp?pic=" + sPic,"View","status, height=500, width=660, scrollbars, resizable")
}


function wrongPic(me)
{
	me.src = "/images/nophoto.jpg"	
}

function showText(iWhich)
{
	var obj
	var oldobj
				
	if (document.getElementById)
	{
		if (iShow > 0)
		{
			oldobj = document.getElementById("mainText" + iShow)
			oldobj.style.display = "none"
		}
		obj = document.getElementById("mainText" + iWhich)
		obj.style.display = ""
	}
	else if (document.all)
	{
		if (iShow > 0)
		{
			oldobj = document.all["mainText" + iShow]
			oldobj.style.display = "none"
		}
		obj = document.all["mainText" + iWhich]
		obj.style.display = ""
	}
	iShow = iWhich
}

function goPrintBrokerage()
{
	newWin = window.open("PrintBrokerage.asp","Print","status, toolbar, height=300, width=460, scrollbars, resizable")
}




