function printpage(autono,tp)
{
	window.open('http://www.business-standard.com/india/printpage.php?autono='+ autono+'&tp='+tp,'','width=470,height=500,scrollbars=yes');
}

function frmval()
{
 	document.headfrm.action="/india/subscription/archives_sub.php"
	document.headfrm.submit();
}
function smart()
{
	window.open('/india/premises/premises.html','smart','resizable=no,status=no,menubar=no,left=100,top=100,title=no,height=478,width=620,scrollbar=no')
}


function callReply(frmname)
{   
		
		if(frmname.dname.value == "")
		{
			alert("please enter the name");
			frmname.dname.focus();
			return false;
		}
		else if(frmname.rep_txtdEmail.value != "")
		{  
			if (!(frmname.rep_txtdEmail.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1))		
				{	
					alert('Please Enter a valid e-mail address.');
					return false;	
				}
		}
		else if(frmname.txtReply_44.value == "")
		{
			alert("please enter the reply");
			frmname.txtReply_44.focus();
			return false;
		}
		
		
		frmname.action="/india/common/replycomment.php";
		frmname.submit();
		

}

function addcomment()
{
		if(document.frmComment.uname.value == "")
		{
			alert("please enter the User name");
			document.frmComment.uname.focus();			
			return false;
		}
		else if(document.frmComment.comments.value == "")
		{
			alert("please enter the comment.");
			document.frmComment.comments.focus();			
			return false;
		}
		else if(document.frmComment.txtEmail.value != "")
		{
			if (!(document.frmComment.txtEmail.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1))		
				{	
					alert('Please Enter a valid e-mail address.');
					return false;	
				}
			
		}
		
		document.frmComment.action="/india/common/addcomment.php";
		document.frmComment.submit();
		
}
		function numlet(field,num)
			{
				if(num == 1)	{
					valid = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_.@#$%//\\:'[];(){}+-*&^!~`";
				}
				var ok = "yes";
				  var temp;
			  for (var i=0; i<field.value.length; i++)
				{
					   temp = "" + field.value.substring(i, i+1);
						
					   if (valid.indexOf(temp) == "-1") ok = "no";	
					   if (temp == " ") ok = "yes";	
				}
				if (ok == "no" ) 
				{
						alert("Blank field not allowed")
				    	field.value="";
					    field.focus();
				} 
			}


	function hideBox(active_i)
		{
		document.getElementById(active_i).style.display = "none";
		return false;
		}

  function showBox(active_i)
		{
		hideBox(active_i);
		document.getElementById(active_i).style.display = "";
		return false;
	}

