  			
	var strUserAgent = navigator.userAgent.toLowerCase();
	var isIE = strUserAgent.indexOf("msie") > -1;
	var isNS6 = strUserAgent.indexOf("netscape6") > -1;
	var isNS4 = !isIE && !isNS6  && parseFloat(navigator.appVersion) < 5;
	var iKeyCode, strKey;
	
			function maskKeyPress(objEvent,strType) {
			switch (strType)
			{
				case "tb_name":
				var reValidChars = /[a-zA-Z]/;
				break;  
				case "tb_cco":
				var reValidChars = /[0-9]/;
			break;
	}
			if (isIE) {
				    iKeyCode = objEvent.keyCode;
				} else {
				    iKeyCode = objEvent.which;
				}
				strKey = String.fromCharCode(iKeyCode);
				if (!reValidChars.test(strKey) && (iKeyCode!=8) && (iKeyCode!=9) && (iKeyCode!=32) ) 
				{
				alert("Invalid Data");
					return false;
				}
			}

function isblank(s)  {
	if ((s == null) || (s == "")) return true;
	for(var i=0;i<s.length;i++)  {
	   var c = s.charAt(i);		
	   if((c != ' ') && (c != '\\n') && (c != '\\t')) return false;
        }
	return true;
	}
function checkform(f) {
    var msg = "";    
	var err = "";
    if (isblank(f.tb_name.value)&& isblank(f.tb_birth.value) && isblank(f.tb_retirement.value) && isblank(f.tb_cco.value))
     { err +="Please enter your Name or Date of Birth or Date of Retirement .\n Or \n Enter your CCO Number";  }
      if(err != "")
	 {       msg += err;
           alert(msg);
       	return(false);	}
	else { return (true); }
}

function datedisplay() {
var now = new Date();
    var days = new Array(
      'Sunday','Monday','Tuesday',
      'Wednesday','Thursday','Friday','Saturday');
    var months = new Array(
      'January','February','March','April','May',
      'June','July','August','September','October',
      'November','December');
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
    function fourdigits(number)	{
      return (number < 1000) ? number + 1900 : number;}
    today =  days[now.getDay()] + ", " +
       months[now.getMonth()] + " " +
       date + ", " +
       (fourdigits(now.getYear()));
     document.write(today);

}

function header() {	
document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=595><TR>')
document.write('<TD>')
document.write('<A><IMG SRC="../images/index_01.gif" BORDER=0></A>')
document.write('</TD>')
document.write('</TR>')
//document.write('<TR>')
//document.write('<TD colspan="7">')
//document.write('<A> style="background-image: url(../images/index_02.gif)" width="780" height="21" align="left"><a href=""#>About Us</a>  |  <a href=""#>Org. SetUp</a>  |  <a href=""#>Functions & Responsibilites</a>|  <a href=""#>Citizen Charter</a>|  <a href=""#>Contact Us</a><img src="images/spacer.gif" width="20" height="1"></td></a>)
//document.write('</TD>)
//document.write('</TR>)
document.write('</TABLE>')
}
function header2() {	
document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 ALIGN="CENTER" ><TR>')
document.write('<TR>')
document.write('<TD colspan="7">')
document.write('<A><IMG SRC="../images/index_01.jpg" width="780" height="81" alt=""></A>')
document.write('</TD>')
document.write('</TR>')
document.write('</TABLE>')
document.write('<TABLE><TR>')
document.write('<TD colspan="7" style="background-image: url(../images/index_02.gif)" width="780" height="21" align="center"><a href="../index.htm"#> Home</a> | <a href="aboutus.htm"#> About Us</a>  |  <a href="orgsetup.htm"#>Org.SetUp</a>  |  <a href="functions.htm"#>Functions</a>  | <a href="charter.htm"#>Citizen Charter</a> | <a href="dosdonts.htm"#>Dos & Donts</a>| <a href="contactus.htm"#>Contact Us</a><img src="../images/spacer.gif" width="20" height="1"></TD>')
document.write('</TR></TABLE>')

}
function footer() {
document.writeln('<CENTER>')
document.writeln('<br><a href="../index.htm"><IMG SRC="../images/home.gif" ALT="Home" WIDTH=40 HEIGHT=40 VSPACE=8 BORDER=0></a>')
document.writeln('<br><font size="2" color="#78000" face="arial, verdana"><b>')
document.writeln('</b></font>')
document.writeln('<HR size="2" width="700">')
document.writeln('<FONT SIZE="1" face="verdana"><B>Site Designed & Developed by:<br></B></FONT><FONT COLOR="#780000" size="1" Face="verdana, arial"><b> National Informatics Centre, Punjab State Unit, Chandigarh</b></FONT><br><FONT COLOR="#780000" size="1" Face="verdana, arial">Contents owned & maintained by the office of Accountant General Punjab</FONT><br>')
document.writeln('<FONT SIZE=-2 face="arial">This site is best viewed in 800x600 resolutions. Use IE 4.5/Netscape 4.5 or above.</FONT><br>')
document.writeln('<a font size="1" color="#ff0000" href="javascript:ds1()">Disclaimer</font>  |</a>')
document.writeln('<a font size="1" color="#ff0000" href="javascript:ds2()">Copyrights</font>  |</a>')
document.writeln('<a font size="1" color="#ff0000" href="javascript:ds3()">Privacy Policy</font> </a><br>')
document.writeln('</CENTER>')
}
function vline() {
document.write('<BR><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH=1 height="100%" BORDER=0 BGCOLOR="#8D5501">')
document.write('<TR>')
document.write('<TD><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></TD>')
document.write('</TR>')
document.write('</TABLE>')
}
function footer2() {
document.writeln('<CENTER>')
document.writeln('<font size="2" color="#78000" face="arial, verdana"><b>')
document.writeln('<b>Account General Punjab Office<b><br>')
document.writeln('<font size="1" color="#B0501C"> Sector ---, Chandigarh - 160 022.</font>')
document.writeln('</b></font>')
document.writeln('<HR size="2" width="650">')
document.writeln('<FONT SIZE="1" face="verdana"><B>Site Designed & Developed by:<br></B></FONT><FONT COLOR="#780000" size="1" Face="verdana, arial"><b> National Informatics Centre, Punjab State Unit, Chandigarh</b></FONT><br><FONT COLOR="#780000" size="1" Face="verdana, arial">Contents owned & maintained by the office of Accountant General Punjab</FONT><br>')
document.writeln('<FONT SIZE=-2 face="arial">This site is best viewed in 800x600 resolutions. Use IE 4.5/Netscape 4.5 or above.</FONT>')
document.writeln('</CENTER>')
}
function footer3() {
document.writeln('<CENTER>')
document.writeln('<FONT SIZE="1" face="verdana"><B>Site Designed & Developed by:<br></B></FONT><FONT COLOR="#780000" size="1" Face="verdana, arial"><b> National Informatics Centre, Punjab State Unit, Chandigarh</b></FONT><br><FONT COLOR="#780000" size="1" Face="verdana, arial">Contents owned & maintained by the office of Accountant General Punjab</FONT><br>')
document.writeln('<a font size="1" color="#ff0000" href="javascript:ds1(0)">Disclaimer</font>  |</a>')
document.writeln('<a font size="1" color="#ff0000" href="javascript:ds2(0)">Copyrights</font>  |</a>')
document.writeln('<a font size="1" color="#ff0000" href="javascript:ds3(0)">Privacy Policy</font>  </a><br>')
document.writeln('<FONT SIZE=-2 face="arial">This site is best viewed in 800x600 resolutions. Use IE 5/Netscape 5 or above.</FONT><br>')
document.writeln('</CENTER>')
}
function ds(requrl){
	mywin=window.open("html/popup.htm","popup","width=600,height=350,screenX=100,screenY=0,scrollbars=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes,directories=no,location=yes");
	setTimeout("mywin.location.href='"+requrl+"';mywin.focus();",2000);
	mywin.focus();
}
function ds1(level){	
	var prefix = "../"
	if (level == 0) prefix = ""
	mywin=window.open(prefix+"html/disclaimer.htm","popup","width=300,height=200,screenX=100,screenY=0,scrollbars=yes,resizable=yes,status=yes,directories=no");
	//setTimeout("mywin.location.href='"+requrl+"';mywin.focus();",2000);
	//mywin.focus();
}
function ds2(level){
var prefix = "../"
	if (level == 0) prefix = ""
	mywin=window.open(prefix+"html/copyrights.htm","popup","width=300,height=200,screenX=100,screenY=0,scrollbars=yes,resizable=yes,status=yes,directories=no");
	//setTimeout("mywin.location.href='"+requrl+"';mywin.focus();",2000);
	//mywin.focus();
}
function ds3(level){
var prefix = "../"
	if (level == 0) prefix = ""
	mywin=window.open(prefix+"html/private.htm","popup","width=300,height=200,screenX=100,screenY=0,scrollbars=yes,resizable=yes,status=yes,directories=no");
	//setTimeout("mywin.location.href='"+requrl+"';mywin.focus();",2000);
	//mywin.focus();
}
function spacer(number) {

 for (var i = 0; i <= number; i++){
 document.write('&nbsp');
 }
   
}



