function expand(s) { 
	var td = s; 
	var d = td.getElementsByTagName("div").item(0); 
	td.className = "menuHover"; 
	d.className = "menuHover"; 
}

function collapse(s) { 
	var td = s; 
	var d = td.getElementsByTagName("div").item(0); 
	td.className = "menuNormal"; 
	d.className = "menuNormal"; 
}

function toggle(targetId)
{
	if (document.getElementById)
	{
		target = document.getElementById(targetId);		
		if (target.style.display == "none")
		{
			target.style.display = "";
		}
		else
		{
			target.style.display = "none";
		}
	}
}

function changeContent(sourcePath,height)
{
	if (document.getElementById)
	{
		target = document.getElementById('content');
		target.src=sourcePath;
		//alert(target.height);
		target.height=height;
	}	
}

// ------------------------------------------------------ //
function changecursormouseover(ID_of_image)
{
	document.getElementById(ID_of_image).style.borderWidth = 1;
	document.getElementById(ID_of_image).style.borderColor = '#33CC66';	
	document.getElementById(ID_of_image).style.cursor='Hand';	
}

function changecursormouseout(ID_of_image)
{
	document.getElementById(ID_of_image).style.borderColor = '#000000';
}

function getPageFileName(sURL)
{
	var arrString=new Array();
	arrString=sURL.split('/');
	return (arrString[arrString.length-1]);
}

function processlink(ID_of_image)
{
	var pagefilename=getPageFileName(document.URL);
	if (ID_of_image=="bflagengland" && pagefilename.match("e.html")==null)
	{			
		arrString=pagefilename.split('.');
		var pagename=arrString[0];
		pagename+='e.html';
		window.location=pagename;		
	}
	else if (ID_of_image=="bflagvietnam" && pagefilename.match("e.html")!=null)
		{			
			pagefilename=pagefilename.replace(/e.html/,".html");
			window.location=pagefilename;
		}			
}