function goStats(val1,val2)
{
	post_to_url('stats-detail.jsp',{'val1':val1,'val2':val2},'post');
}

function goannouncementPage(val)
{
	var index = val.name;
	post_to_url('Announcement.jsp',{'val1':index},'post');
}

function searchAnnouncementPage(val)
{
	post_to_url('announcementlanding.jsp',{'val1':val},'post');
}

function searchannouncemonth(val)
{
	var month = val.value;
	post_to_url('announcementlanding.jsp',{'month':month},'post');
}

function goInterviewHomePageNews(val)
{
	var home = val.name;	
	post_to_url('homenews.jsp',{'home':home},'post');
}

function searchInterviewPage(val)
{
	post_to_url('interview.jsp',{'val1':val},'post');
}

function searchinterviewmonth(val)
{
	var month = val.value;
	post_to_url('interview.jsp',{'month':month},'post');
}


function goPageNewsHome(val)
{
	var home = val.name;	
	post_to_url('homenews.jsp',{'home':home},'post');
}

function searchNewsPage(val)
{
	post_to_url('news.jsp',{'val1':val},'post');
}

function searchnewsmonth(val)
{
	var month = val.value;
	post_to_url('news.jsp',{'month':month},'post');
}

function goHomePageFeature(val)
{
var home = val.name;	
	post_to_url('homenews.jsp',{'home':home},'post');
}

function goHomePageNews(val)
{
	var home = val.name;	
	post_to_url('homenews.jsp',{'home':home},'post');
}

function searchFeaturePage(val)
{
	post_to_url('specialfeacture.jsp',{'val1':val},'post');
}

function searchfeaturemonth(val)
{
	var month = val.value;
	post_to_url('specialfeacture.jsp',{'month':month},'post');
}

function searchTeamPage(val)
{
	var team = val.value;
	post_to_url('player-index.jsp',{'team':team},'post');
}

function goProfilePage(val)
{
	var playerindex = val.name; 
	post_to_url('player-profile.jsp',{'playerindex':playerindex},'post');
}

function goSearchPage(val)
{
	post_to_url('player-index.jsp',{'searchindex':val},'post');
}


function post_to_url(path, params, method) 
{
    method = method || "post";
   
    var form = document.createElement("form");
    form.setAttribute("method", method);
    form.setAttribute("action", path);

    for(var key in params)
	 {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", key);
        hiddenField.setAttribute("value", params[key]);

        form.appendChild(hiddenField);
    }
    document.body.appendChild(form);
    form.submit();
}
