//function to show textboxex for search option
		function showTextbox(id1,id2,id3,id4)
		{
			
			if(document.getElementById(id1).style.display=="none")
			{
				document.getElementById(id1).style.display="block";
				document.getElementById(id2).style.display="none";
				document.getElementById(id3).style.display="none";
				document.getElementById("productname").value="";
				document.getElementById("theropaticsegment").value="";
				document.getElementById("principle").value="";
			
				if(id4=="p")
				{
					document.getElementById("pid").value=1;
				}
				
				if(id4=="t")
				{
					document.getElementById("thpid").value=1;
				}
				/*if(document.getElementById("productname").value=="")
				{
				document.getElementById("productname").value="Product name begins with...";
				document.getElementById("productname").style.color="#B4B4B4";
				}
				if(document.getElementById("theropaticsegment").value=="")
				{
				document.getElementById("theropaticsegment").value="Therapeutic segment begins with...";
				document.getElementById("theropaticsegment").style.color="#B4B4B4";
				}
				if(document.getElementById("principle").value=="")
				{
				document.getElementById("principle").value="Principle name begins with...";
				document.getElementById("principle").style.color="#B4B4B4";
				}*/
			}			
			/*switch(id1)
			{
				case "idProdName":
					document.getElementById("theropaticsegment").value="Therapeutic segment begins with...";
					document.getElementById("theropaticsegment").style.color="#B4B4B4";
					document.getElementById("principle").value="Principle name begins with...";
					document.getElementById("principle").style.color="#B4B4B4";
					break;
				case "idThSeg":
					document.getElementById("productname").value="Product name begins with...";
					document.getElementById("productname").style.color="#B4B4B4";
					document.getElementById("principle").value="Principle name begins with...";
					document.getElementById("principle").style.color="#B4B4B4";
					break;
				case "idPrinciple":
					document.getElementById("productname").value="Product name begins with...";
					document.getElementById("productname").style.color="#B4B4B4";
					document.getElementById("theropaticsegment").value="Therapeutic segment begins with...";
					document.getElementById("theropaticsegment").style.color="#B4B4B4";
				
			}			*/
		}		
		function trim(str)
		{
			//function to remove spaces from given string
		   return str.replace(/^\s+|\s+$/g,'');
		}	
		function resetForm()
		{
			document.getElementById("idProdName").style.display="none";
			document.getElementById("idThSeg").style.display="none";
			document.getElementById("idPrinciple").style.display="none";
			document.getElementById("productname").value="";
			document.getElementById("theropaticsegment").value="";
			document.getElementById("principle").value="";
			document.getElementById("pid").value="";
			document.getElementById("thpid").value="";
			/*document.getElementById("productname").value="Product name begins with...";
			document.getElementById("productname").style.color="#B4B4B4";
			document.getElementById("theropaticsegment").value="Therapeutic segment begins with...";
			document.getElementById("theropaticsegment").style.color="#B4B4B4";
			document.getElementById("principle").value="Principle name begins with...";
			document.getElementById("principle").style.color="#B4B4B4";
			document.getElementById("alert").innerHTML="";*/
			document.getElementById("radio1").checked=false;
			document.getElementById("radio2").checked=false;
			document.getElementById("radio3").checked=false;
			
		}
		
		function setTextBox(id,arg)
		{
			
				/*if(id== "productname")
				{
					if(arg=="focus")
						if(document.getElementById(id).value=="Product name begins with...")
						{
						document.getElementById(id).style.color="#000000";
						document.getElementById(id).value="";
						}
						
					if(arg=="blur")
					{
						
						if(document.getElementById(id).value=="")
						document.getElementById(id).value="Product name begins with...";
						if(document.getElementById(id).value=="Product name begins with...")
						document.getElementById(id).style.color="#B4B4B4";
					}
					
				}
				if(id== "theropaticsegment")
				{
					if(arg=="focus")
					{
						if(document.getElementById(id).value=="Therapeutic segment begins with...")
						{
						document.getElementById(id).style.color="#000000";
						document.getElementById(id).value="";
						}
					}
					if(arg=="blur")
					{
						
						if(document.getElementById(id).value=="")
						document.getElementById(id).value="Therapeutic segment begins with...";
						if(document.getElementById(id).value=="Therapeutic segment begins with...")
						document.getElementById(id).style.color="#B4B4B4";
					}					
				}
				if(id== "principle")
				{
					if(arg=="focus")
					{
						if(document.getElementById(id).value=="Principle name begins with...")
						{
						document.getElementById(id).style.color="#000000";
						document.getElementById(id).value="";
						}
					}
					if(arg=="blur")
					{
						
						if(document.getElementById(id).value=="")
						document.getElementById(id).value="Principle name begins with...";
						if(document.getElementById(id).value=="Principle name begins with...")
						document.getElementById(id).style.color="#B4B4B4";
					}					
				}
			*/
			
		}