function pageLoadCommon()
{}
 
function CustomiseSite(sOldName,sNewName,sURL)
{

	if(sNewName.length > 0)
	{
		var sMsg="This will customise the site for " + sNewName + ".";
		if (sOldName.replace(' ','').length > 0)
			sMsg+="\nYou can return to " +  sOldName + " from the 'Recent' menu at the left of the screen.";
		
		sMsg+=" Continue?";
		if(!confirm(sMsg))
			return;
	}
	
	var sRecent=GetCookie("RECENT");
	if(sRecent!="" && sURL.toLowerCase().indexOf("recent")<0)
	{
		if(sURL.indexOf("?")<0)
			sURL+="?";
			
		sURL+="&recent=" + sRecent;
		
	}
		
//alert(sURL);
	document.location=sURL;


}

function TransferSite(sOldName,sNewName,iEntityID)
{

	if(sNewName.length > 0)
	{
		var sMsg;
		if(sTransferSiteMSG!="") //defined in local.js
			sMsg=sTransferSiteMSG.replace(":1",sNewName);
		else
			sMsg="Transfer to the site of: " + sNewName + "?";
			
		//if (sOldName.replace(' ','').length > 0)
		if(!confirm(sMsg))
			return ;
	} 
	

	document.location="/go.aspx?entityID=" + iEntityID;


}
 
 
var PlayerClicked=false;

function cl_mat(id)
{
if(PlayerClicked)
	return ;
redirect("/common/pages/redirector.aspx?loc=MATCH&matchID=" + id);
 
} 

function cl_matA(id,eid)
{
if(PlayerClicked)
	return ;
	var sURL="/common/pages/redirector.aspx?loc=MATCH&matchID=" + id;
	if(eid!=0)
		sURL+="&entityID=" + eid;
	redirect(sURL);
 
} 

function cl_ply(id)
{
 //window.event.cancelBubble= true;
	PlayerClicked=true;
	redirect("/cricket/reports/player.asp?playerID=" + id); 
}

function cl_plyc(id,cid,sid)
{
 //window.event.cancelBubble= true;
	PlayerClicked=true;
	redirect("/cricket/reports/player.asp?playerID=" + id + "&eID=" + cid + "&seasonID=" + sid); 
} 

function cl_plyca(id,cid)
{
 //window.event.cancelBubble= true;
	PlayerClicked=true;
	redirect("/cricket/reports/playerCareerBatting.asp?playerID=" + id + "&eID=" + cid); 
} 

function changeMyMenu(oSel,sEditLoc,sRedirLoc)
	{
		//var oSel=document.frmMyMenu.selMyMenu;
		var sSelected=oSel.options[oSel.selectedIndex].value;
	
		switch(sSelected)
		{ 
		case "edit":
			//var sLocn='/cricket/utils/mymenu_maint.asp';
			document.location.href=sEditLoc;
			break;
		case "null":
			alert("Please make a selection in the myMenu dropdown.");		
			break;
		default:
			//var sLocn='/cricket/redirector.asp?' + sSelected;
			document.location.href=sRedirLoc + '?' + sSelected;
	
		}
	}


