
function goToPage(inpPage)
{
	//Change Ad On Homepage
	parent.rotateAd();

	ptrDiv = parent.document.getElementById("frmMain");

	if (inpPage == "siteHome")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/home.html";
	}

	else if (inpPage == "myHome")
	{
	    if (parent.currUser.userType == "admin") { goToPage("adminHome"); }
	    else if (parent.currUser.userType == "groundAdmin") { goToPage("groundAdmin"); }
	    else if (parent.currUser.userType == "futsalAdmin") { goToPage("futsalAdmin"); }
	    else if (parent.currUser.userType == "marketingAdmin") { goToPage("marketingAdmin"); }
	    else if (parent.currUser.userType == "webAdmin") { goToPage("webAdmin"); }
	    else if (parent.currUser.userType == "staff") { goToPage("staffHome"); }
	    else if (parent.currUser.userType == "player") { goToPage("playerHome"); }
	    else { goToPage("siteHome"); }
	}
	else if (inpPage == "groundAdmin")
	{
	    if (parent.currUser.userType == "groundAdmin")
	    {
	        setCookie("hufc_currPage", inpPage, 1);
	        ptrDiv.src = "./pages/home_groundAdmin.html";
	    }
	}
	else if (inpPage == "futsalAdmin")
	{
	    if (parent.currUser.userType == "futsalAdmin")
	    {
	        setCookie("hufc_currPage", inpPage, 1);
	        ptrDiv.src = "./pages/home_futsalAdmin.html";
	    }
	}
	else if (inpPage == "marketingAdmin")
	{
	    if (parent.currUser.userType == "marketingAdmin")
	    {
	        setCookie("hufc_currPage", inpPage, 1);
	        ptrDiv.src = "./pages/home_marketingAdmin.html";
	    }
	}
	else if (inpPage == "webAdmin")
	{
	    if (parent.currUser.userType == "webAdmin")
	    {
	        setCookie("hufc_currPage", inpPage, 1);
	        ptrDiv.src = "./pages/home_webAdmin.html";
	    }
	}
	else if (inpPage == "adminHome")
	{
	    if (parent.currUser.userType == "admin")
	    {
	        setCookie("hufc_currPage", inpPage, 1);
	        ptrDiv.src = "./pages/home_admin.html";
	    }
	}			
	else if (inpPage == "staffHome")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/home_staff.html";
	}
	else if (inpPage == "playerHome")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/home_player.html";
	}
	else if (inpPage == "teamHome")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/home_team.html";
	}

	else if (inpPage == "news")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/news.html";
	}

	else if (inpPage == "development")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/development.html";
	}
	else if (inpPage == "committee")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/committee.html";
	}
	else if (inpPage == "coachingStaff")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/coachingStaff.html";
	}
	else if (inpPage == "merchandise")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/merchandise.html";
	}
	else if (inpPage == "teams")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/teams.html";
	}
	else if (inpPage == "events")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/events.html";
	}
	else if (inpPage == "policies")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/policies.html";
	}
	else if (inpPage == "multimedia")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/multimedia.html";
	}

	else if (inpPage == "sponsorship")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/sponsorship.html";
	}
	else if (inpPage == "businessDirectory")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/businessDirectory.html";
	}



	else if (inpPage == "links")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/links.html";
	}


	else if (inpPage == "contact")
	{
	    setCookie("hufc_currPage", inpPage, 1);
	    ptrDiv.src = "./pages/contactUs.html";
	}



	else if (inpPage == "playerAdd")
	{
	    setCookie("hufc_userType", "player", 1);
	    ptrDiv.src = "pages/add_user.html";
	}
	else if (inpPage == "playerModify")
	{
	    setCookie("hufc_userType", "player", 1);
	    ptrDiv.src = "pages/modify_user.html";
	}

	else if (inpPage == "staffAdd")
	{
	    setCookie("hufc_userType", "staff", 1);
	    ptrDiv.src = "pages/add_user.html";
	}
	else if (inpPage == "staffModify")
	{
	    setCookie("hufc_userType", "staff", 1);
	    ptrDiv.src = "pages/modify_user.html";
	}

	else if (inpPage == "teamAdd")
	{
	    ptrDiv.src = "pages/add_team.html";
	}
	else if (inpPage == "teamModify")
	{
	    ptrDiv.src = "pages/modify_team.html";
	}

	else if (inpPage == "assessmentAdd")
	{
	    ptrDiv.src = "pages/add_assessment.html";
	}
	else if (inpPage == "assessmentModify")
	{
	    ptrDiv.src = "pages/modify_assessment.html";
	}

	else if (inpPage == "reportAdd")
	{
	    ptrDiv.src = "pages/add_report.html";
	}
	else if (inpPage == "reportModify")
	{
	    ptrDiv.src = "pages/modify_report.html";
	}

	else if (inpPage == "newsAdd")
	{
	    ptrDiv.src = "pages/add_news.html";
	}
	else if (inpPage == "newsModify")
	{
	    ptrDiv.src = "pages/modify_news.html";
	}

	else if (inpPage == "eventAdd")
	{
	    ptrDiv.src = "pages/add_event.html";
	}
	else if (inpPage == "eventModify")
	{
	    ptrDiv.src = "pages/modify_event.html";
	}

	else if (inpPage == "advertisementAdd")
	{
	    ptrDiv.src = "pages/add_advertisement.html";
	}
	else if (inpPage == "advertisementModify")
	{
	    ptrDiv.src = "pages/modify_advertisement.html";
	}

	else if (inpPage == "homepageImageAdd")
	{
	    ptrDiv.src = "pages/add_homepageImage.html";
	}

	else if (inpPage == "homepageVideoAdd")
	{
	    ptrDiv.src = "pages/add_homepageVideo.html";
	}

	else if (inpPage == "forgotPassword")
	{
	    ptrDiv.src = "pages/forgotPassword.html";
	}
	
	else if (inpPage == "futsal")
	{
	    ptrDiv.src = "pages/futsal.html";
	}
    else if (inpPage == "futsalImageAdd")
	{
	    ptrDiv.src = "pages/add_futsalImage.html";
	}	
    else if (inpPage == "futsalNewsAdd")
	{
	    ptrDiv.src = "pages/add_futsalNews.html";
	}
	else if (inpPage == "futsalNewsModify")
	{
	    ptrDiv.src = "pages/modify_futsalNews.html";
	}
	
	else if (inpPage == "abisagame")
	{
	    ptrDiv.src = "pages/AbisAGame.html";
	}
		
    else if (inpPage == "trials")
	{
	    ptrDiv.src = "pages/trials.html";
	}
	
	else if (inpPage == "AGM")
	{
	    ptrDiv.src = "pages/AGM.html";
	}
	
	else
	{
	    alert("Unknown page: " + inpPage);
	}    
}

