function txtcheck(txtvalue)
{


if (trim(txtvalue)=="" || txtvalue=="" )
			{
			alert("Blank input is not valid..");
		return false;
			}
			
			else
			{

		var tval =txtvalue;
		Badarray = new Array("<",">","'","!","$","%","-","(",")",";","=","#","^","||","&");
		var arrlen =Badarray.length;
		var txtlen = tval.length;
		if (txtlen ==0)
		{
		return 0;
		}
		for (var x = 0; x <= arrlen - 1 ; x++)
			{
				for (var y = 0; y <= txtlen; y++)
					{
					if (Badarray[x] == tval.charAt(y))
					{
					alert("Invalid Characters found in entries..Please Check!!");
					return 0;					
					}
				
				}
			}
		}	
}
	
	
	function trim(str)
{
    if(!str || typeof str != 'string')
        return null;

    return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,'');
}

	
		
function gotopage()
{
   var sTargetURL = "homenew.aspx";
  location.href = sTargetURL;
}
function pwdcheck(pwdvalue)
{

		var tval =pwdvalue;
		Badarray = new Array("<",">","'","!","%","-","(",")",";","=","^","||","&");
		var arrlen =Badarray.length;
		var txtlen = tval.length;
		if (txtlen ==0)
		{
		return 0;
		}
		for (var x = 0; x <= arrlen - 1 ; x++)
			{
				for (var y = 0; y <= txtlen; y++)
					{
					if (Badarray[x] == tval.charAt(y))
					{
					alert("Invalid Characters found in entries..Please Check!!");
					return 0;					
					}
				
				}
			}
		}
function txtcheck_bracket(txtvalue)
{

		var tval =txtvalue;
		Badarray = new Array("<",">","'","!","$","%","-",";","=","#","^","||","&");
		var arrlen =Badarray.length;
		var txtlen = tval.length;
		if (txtlen ==0)
		{
		return 0;
		}
		for (var x = 0; x <= arrlen - 1 ; x++)
			{
				for (var y = 0; y <= txtlen; y++)
					{
					if (Badarray[x] == tval.charAt(y))
					{
					alert("Invalid Characters found in entries..Please Check!!");
					return 0;					
					}
				
				}
			}
		}
	function Validate(txtvalue)
		{
			if (trim(document.getElementById("txtvalue").value)=="")
			{
			alert("Blank input is not valid");
		return false;
			}
			else{
				return 1;
			}
		}
		
		function script(ltr,bk)
		{
		  If (bk == "back" || ltr == "letters")
		   {
		   document.get
		        alert(print);   
		                	        
				Button1.style.visibility= 'hidden';

				window.print();
							
				Button2.style.visibility= 'visible';
               
            }
            Else
            {   Button1.style.visibility= 'hidden';
		     	Button2.style.visibility= 'hidden';
				window.print();
				Button1.style.visibility='visible';
				Button2.style.visibility= 'visible';
                      
            }
          return false;
		}
        //-------------------------News_search.aspx----------------------------------------

		var i=0;	
		function showDiv()
		{
		if (i%2==0)
		{
		document.getElementById("adv").style.visibility='visible';	
		showDateDiv();
		}
		else
		{
		document.getElementById("adv").style.visibility='hidden';	
		document.Form1.rdbtype_3.checked=true;
		document.getElementById("date").style.visibility="hidden";
		document.getElementById("divbox").style.visibility='visible';			
		}
		i++;
		
		return false;
		}
		
		function showDateDiv()
		{
		//alert(document.getElementById("rdbtype_1").checked);
		if(document.getElementById("rdbtype_1").checked ==true)
		{
		document.Form1.txtFrom.value="";
		document.Form1.txtTo.value="";
		document.getElementById("date").style.visibility="visible";	
		document.Form1.searchBox.value="";	
		document.getElementById("divbox").style.visibility="hidden";		
		}
		else
		{
		document.getElementById("divbox").style.visibility="visible";	
		document.getElementById("date").style.visibility="hidden";		
		}
		}
		//---------------------------------------------------------------------------------
function confirmDone()
{
if(confirm("Printing Over?")==false)
{
return false;
}
}
//--------------------
function PrintAlert()
{
if(alert("You are printing the Notesheet,to take the print of the newsitem click on the event ID"))
{
return true;
}
}

function Printletter()
{
if(alert("You are printing the Coveringletter,to take the print of the newsitem click on the event ID"))
{
return true;
}
}
		
		
		
		
		
			