var menuids=["treemenu1"] //Enter id(s) of SuckerTree UL menus, separated by commas

	function buildsubmenus_horizontal()
	{
		for (var i=0; i<menuids.length; i++)
		{
			var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
			for (var t=0; t<ultags.length; t++)
			{
				if (ultags[t].parentNode.parentNode.id==menuids[i])
				{ //if this is a first level submenu
					ultags[t].style.top=ultags[t].parentNode.offsetHeight+"px" //dynamically position first level submenus to be height of main menu item
					/* ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon" */
				}
				else
				{ //else if this is a sub level menu (ul)
				ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetwidth+"px" //position menu to the right of menu item that activated it
				/* ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon" */
				}
				ultags[t].parentNode.onmouseover=function()
				{
					this.getElementsByTagName("ul")[0].style.zindex="10005";
					this.getElementsByTagName("ul")[0].style.visibility="visible";
					/* var strPath = this.getElementsByTagName("img")[0].src;
					var arrPath	= strPath.split("_");
					if(arrPath[1] = 'off_gif')
					{	
						this.getElementsByTagName("img")[0].src	= arrPath[0]+"on.gif";
					}
					else
					{
						this.getElementsByTagName("img")[0].src	= arrPath[0]+"off.gif";
					} */
				}
				ultags[t].parentNode.onmouseout=function()
				{
					this.getElementsByTagName("ul")[0].style.visibility="hidden"
					/* var strPath = this.getElementsByTagName("img")[0].src;
					var arrPath	= strPath.split("_");
					if(arrPath[0] = 'on_gif')
					{
						this.getElementsByTagName("img")[0].src	= arrPath[0]+"off.gif";	
					} */
				}
			}
		}
	}
	if (window.addEventListener) //DOM method for binding an event
	window.addEventListener("load", buildsubmenus_horizontal, false)
	else if (window.attachEvent) //IE exclusive method for binding an event
	window.attachEvent("onload", buildsubmenus_horizontal)


function controlLink(form)
{
	if(form.my_body.value == "")
   {
       alert("Please enter your email id");
       form.my_body.focus();
       return false;
   }
   if(form.my_body.value != "")
   {
       if (!isEmail(form.my_body.value))
       {
           alert("Please enter valid email id");    
           form.my_body.focus();
           return false;
       }
   } 

{
	var x;
//	var strMail	=	"mailto:marketing@socratesinc.com?subject=Enquiry from Socrates Inc.&body="+form.my_body.value; // orignal code commented on aug12 saran
    var strMail	=	"mailto:info@soluciaconsulting.com?subject=Enquiry from Solucia &body="+form.my_body.value;

	obj	=	document.getElementById("flag");
	//obj.href	=	strMail;
	x = window.open(strMail, 'prWin');
	if ( x != null && x != undefined )
	{
		x.close();
	}
}
	
}

function isEmail(obj)
{      str = obj;
   var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
   if (!filter.test(str))
   {
       return false;
   }
   return true;
}

