function dmTrySubmit(e, buttonid, objId)
{
	var bt = document.getElementById(buttonid); 
	if (typeof bt == 'object')
	{ 
		if(navigator.appName.indexOf("Netscape")>(-1))
		{ 
			if (e.keyCode == 13)
			{ 
				
				//e.keyCode = 0;
				e.returnValue = false;
				e.cancelBubble = true;
				if (e.stopPropagation) e.stopPropagation(); // moz
				bt.click();
				return false; 
			} 
		} 
		if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
		{ 
			if (event.keyCode == 13)
			{ 
				
				e.keyCode = 0;
				e.returnValue = false;
				e.cancelBubble = true;
				bt.click();
				return false;
			} 
		} 
	}
}
function ValidateSearchBox(id)
		{
				var m = document.getElementById(id).value;
				//var button = id.substr(0,id.length)
				//alert()
//				var m = Trim(m);
				if(m.length< 1)
				{
					
					return false;
				}
				
//				else if (m.search(/^[\w+áàäçéèêñóòôöüæøå ]+( \w[áàäçéèêñóòôöüæøå ]+)?$/) == -1)
//				{
//					alert("Special characters not allowed"); 
//					return false;
//				}
			
			return true;
		}
		

function printArticle()//This function is to display the popup window for printing the article
{
	window.open('Print.aspx','printer','scrollbars=yes, toolbar=no, resizable=yes ,width=770px, height=500px');
}

function Subscribe()//This function is to display the popup window for subscribe
{
	window.open('SubscribeNews.aspx','subscribe','scrollbars=no, toolbar=no, resizable=yes ,width=600px, height=250px');
}

function tellafriend(MenuID, MainID)//This function is to display the popup window for tell a friend
{
	window.open('TellAFriend.aspx?m=' + MenuID + '&amid=' + MainID,'tell','scrollbars=no, toolbar=no, resizable=yes, width=400px, height=200px');
}

function mouseOverEffect()
{
	var menuDisplay = document.getElementById("menuDisplay");
	if(menuDisplay!=null)
	{
	var menuDisplayDiv = menuDisplay.getElementsByTagName("div")
	for (i=1;i<menuDisplayDiv.length;i=i+2)
	{
		menuDisplayDiv[i].onmouseover = function()
										{
											this.className = this.className+" mseover"
										}
		menuDisplayDiv[i].onmouseout = function()
										{
											var cssclass = this.className
											var oldname = cssclass.split(" ")
											this.className = oldname[0]
											
										}
										
	}
}
	
}mouseOverEffect()

function GetSearchFocused(e, buttonid)
{
	var bt = document.getElementById(buttonid); 
	if (typeof bt == 'object')
	{	
		
		if(navigator.appName.indexOf("Netscape")>(-1))
		{ 
			if (e.keyCode == 13)
			{
				e.keyCode = 0;
				e.returnValue = false;
				e.cancelBubble = true;
				bt.click(); 
				
				return false; 
			}
		} 
		if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
		{ 
			if (event.keyCode == 13)
			{ 
				e.keyCode = 0;
				e.returnValue = false;
				e.cancelBubble = true;
				bt.click();
				
				return false;
			} 
		} 
	}
}

