//functions declarations


function scbg(objRef, state) {
	objRef.style.backgroundColor = (1 == state) ? '#EEEEEE' : '#FFFFFF';
	return;
}

function scbg2(objRef, state, bgcolor) {
	objRef.style.backgroundColor = (1 == state) ? '#EEEEEE' : bgcolor;
	return;
}


function getBlank (form, stdValue){
	if (form.value == stdValue){
		form.value = '';
	}
	return true;
}

function header(){	
	header_top()
	header_bottom()
}

function header_top(){
	var icon_dir = getIconPath()
	var image_dir = getImagePath()
	var html_dir = getHtmlPath()
	var root_path = getRootPath()
	
	document.writeln(	
		'<table cellpadding="0" cellspacing="0"> \n'+
		'<tr> \n'+
		'	<td style="background-color:#a6a989;width:123px;text-align:center;font-weight:bold;"><a style="text-decoration:none;" title="click here to return to the home page" href="'+root_path+'index.html">home</a></td> \n'+
		'	<td style="width:4px;"></td> \n'+
		'	<td style="background-color:#cd4a04;padding:2px 5px 5px 5px;"> \n'+
		'		<a title="About Us" href="'+html_dir+'about_us.htm">about us</a> | \n'+
		'		<a title="Functions &amp; activities" href="'+html_dir+'functions_activities.htm">functions &amp; activities</a> | \n'+
		'		<a title="Services" href="'+html_dir+'services.htm">services</a> | \n'+
		'		<a title="Statistics" href="'+html_dir+'statistics.htm">statistics</a> | \n'+
		'		<a title="Notifications" href="'+html_dir+'notifications.htm">notifications</a> | \n'+
		'		<a title="Acts &amp; Rules" href="'+html_dir+'acts_rules.htm">acts &amp; rules</a> | \n'+
		'		<a title="Forms &amp; Procedures" href="'+html_dir+'forms_procedures.htm">forms &amp; procedures</a> \n'+
		'	</td> \n'+
		'</tr> \n'+
		'</table>'
	)
}

function header_bottom(){
	var icon_dir = getIconPath()
	var image_dir = getImagePath()
	var html_dir = getHtmlPath()
	var root_path = getRootPath()
	
	document.writeln(	
		'<table cellpadding="0" cellspacing="0" style="margin-top:4px;"> \n'+
		'<tr> \n'+
		'	<td rowspan="2" style="background-image: url('+image_dir+'labour2.jpg);width:123px;background-repeat:no-repeat;"></td> \n'+
		'	<td style="width:4px;" rowspan="2"></td> \n'+
		'	<td style="width:673px;" colspan="2"><img src="'+image_dir+'banner.jpg" alt="" width="653" height="91" /></td> \n'+
		'</tr> \n'+
		'<tr> \n'+
		'	<td style="vertical-align:middle;background-color:#524d27;text-align:center;"> \n'+
		'		<div class="search"> \n'+
		'		search this site: \n'+
		'		<form style="display:inline" action="http://www.google.com/search" method="get"> \n'+
		'			<input value="http://pblabour.gov.in" name="sitesearch" type="hidden"/> \n'+
		'			<input class="search" onfocus="getBlank (this, \'Search the site with google:\');" value="Search the site with google:" name="q" id="query" type="text"/> \n'+
		'			<input value="Search" type="image" src="'+icon_dir+'search_button.gif" name="Search" alt="Search" /> \n'+
		'		</form> \n'+
		'		</div> \n'+
		'	</td> \n'+
		'	<td style="padding-right:2px;vertical-align:middle;height:22px;background-color:#524d27;text-align:right;"> \n'+
		'		<a title="Contact Us" href="'+html_dir+'contact_us.htm">contact us</a> | \n'+
		'		<a title="Send Your Feedback" href="mailto:delc@punjabmail.gov.in?subject=feedback">send your feedback</a> \n'+
		'	</td> \n'+
		'</tr> \n'+
		'</table>'
	)
}

function header_index(){
	var icon_dir = getIconPath()
	var image_dir = getImagePath()
	var html_dir = getHtmlPath()
	var root_path = getRootPath()
	
	document.writeln(	
		'<table cellpadding="0" cellspacing="0"> \n'+
		'<tr> \n'+
		'	<td style="width:780px;background-color:#2E3514;" colspan="2"><img src="'+image_dir+'bannerhome.jpg" alt="" width="780" height="91" /></td> \n'+
		'</tr> \n'+
		'<tr> \n'+
		'	<td style="vertical-align:middle;background-color:#524d27;text-align:center;"> \n'+
		'		<div class="search"> \n'+
		'		search this site: \n'+
		'		<form style="display:inline" action="http://www.google.com/search" method="get"> \n'+
		'			<input value="http://pblabour.gov.in" name="sitesearch" type="hidden"/> \n'+
		'			<input class="search" onfocus="getBlank (this, \'Search the site with google:\');" value="Search the site with google:" name="q" id="query" type="text"/> \n'+
		'			<input value="Search" type="image" src="'+icon_dir+'search_button.gif" name="Search" alt="Search" /> \n'+
		'		</form> \n'+
		'		</div> \n'+
		'	</td> \n'+
		'	<td style="padding-right:2px;vertical-align:middle;height:22px;background-color:#524d27;text-align:right;"> \n'+
		'		<a title="Contact Us" href="'+html_dir+'contact_us.htm">contact us</a> | \n'+
		'		<a title="Send Your Feedback" href="mailto:delc@punjabmail.gov.in?subject=feedback">send your feedback</a> \n'+
		'	</td> \n'+
		'</tr> \n'+
		'</table>'
	)
}


function header_bottom2(){	
	var icon_dir = getIconPath()
	var image_dir = getImagePath()
	var html_dir = getHtmlPath()
	var root_path = getRootPath()
	
	
	document.writeln(
	'<table cellpadding="0" cellspacing="0" style="margin-top:4px;"> \n'+
	'<tr> \n'+
	'	<td rowspan="2" style="background-image: url('+image_dir+'topleft_theme_image.gif);width:123px;background-repeat:no-repeat;"></td> \n'+
	'	<td style="width:4px;" rowspan="2"></td> \n'+
	'	<td style="width:673px;" colspan="2"><img src="'+image_dir+'tf_image_01.gif" alt="" height="91" width="31" /><img src="'+image_dir+'tf_image_02.gif" alt="" width="80" height="91" /><img src="'+image_dir+'tf_image_03.gif" alt="" width="323" height="91" /><img src="'+image_dir+'tf_image_04.gif" alt="" width="146" height="91"/><img src="'+image_dir+'tf_image_05.gif" alt="" width="73" height="91" /></td> \n'+
	'</tr> \n'+
	'<tr> \n'+
	'	<td style="vertical-align:middle;background-color:#524d27;text-align:center;"> \n'+
	'		<div class="search"> \n'+
	'		search this site: \n'+
	'		<form style="display:inline" action="http://www.google.com/search" method="get"> \n'+
	'			<input value="http://punjab.nic.in" name="sitesearch" type="hidden"/> \n'+
	'			<input class="search" onfocus="getBlank (this, \'Search the site with google:\');" value="Search the site with google:" name="q" id="query" type="text"/> \n'+
	'			<input value="Search" type="image" src="'+icon_dir+'search_button.gif" name="Search" alt="Search" /> \n'+
	'		</form> \n'+
	'		</div> \n'+
	'	</td> \n'+
	'	<td style="padding-right:2px;vertical-align:middle;height:22px;background-color:#524d27;text-align:right;"> \n'+
	'		<a title="Contact Us" href="'+html_dir+'contact_us.htm">contact us</a> | \n'+
	'		<a title="Send Your Feedback" href="mailto:email@punjabmail.gov.in?subject=feedback">send your feedback</a> \n'+
	'	</td> \n'+
	'</tr> \n'+
	'</table>'
	)
}

function topstrip(){
	var html_dir = getHtmlPath()
	var home_link = ""
	if (position > 0){
		home_link = '<a href="'+html_dir+'../index.html">Home</a>'
	}
//	document.writeln(
//	'<div class="menu"> \n'+
//	'<table cellpadding="0" cellspacing="0"> \n'+
//	'<tr> \n'+
//	'	<td class="col1">'+home_link+'</td> \n'+
//	'	<td class="col2">Welcome to Official website of ....!</td> \n'+
//	'</tr> \n'+
//	'</table> \n'+
//	'</div>'
//	)
}

function footer(){	
	var icon_dir = getIconPath()
	var image_dir = getImagePath()	
	var html_dir = getHtmlPath()		
	
	document.writeln('<hr /> \n')
	
	copyright() 
	
	var menu_link = ""
	if (position > 0){
		menu_link = '<div class="menu"> \n'+
					'<table border="0" cellpadding="0" cellspacing="0" width="500"> \n'+
					'<tr valign="top"> \n'+
					'	<td> \n'+
					'		<a href="'+html_dir+'../index.html">Home</a> \n'+
					'		<span class="menu-separator">||</span> \n'+
					'		<a href="'+html_dir+'contact_us.htm">Contact Us</a> \n'+
					'		<span class="menu-separator">||</span> \n'+
					'		<a href="mailto:sio-punjab@nic.in">Send your Feedback</a> \n'+
					'	</td> \n'+
					'</tr> \n'+
					'</table> \n'+
					'</div> \n'
	}
	
	document.writeln(
	menu_link+
	'<div class="resolution">This site is best viewed in 800x600 resolutions. Use IE 4.5/Netscape 4.5 or above.</div> '
	)
	
}

function copyright(){		
	var html_dir = getHtmlPath()
	document.writeln(
	'<div id="copyright"> \n'+
	'	<a href="javascript:void(0)" onclick="pop_nic(\''+html_dir+'copyright.htm\')">Copyright</a><br/> \n'+
	'	<a href="javascript:void(0)" onclick="pop_nic(\''+html_dir+'disclaimer.htm\')">Disclaimer</a><br/> \n'+
	'	<a href="javascript:void(0)" onclick="pop_nic(\''+html_dir+'privacy_statement.htm\')">Privacy Statement</a> \n'+
	'</div> \n'
	)
}




function menu(){
	var icon_dir = getIconPath()
	var image_dir = getImagePath()	
	var html_dir = getHtmlPath()		
	
	var url = document.location.href
	var index = url.lastIndexOf("/")
	var filename = url.substring(index+1, url.length)
	index = filename.lastIndexOf("#")
	var filename2 = filename
	if (index > -1) filename2 = filename.substring(0, index)
	
	for (var i = 0; i < menu_heads.length; i++){
		if (menu_heads[i][0] == menu_id){
			document.writeln('<div class="menupage-group">')
			document.writeln('	<div class="menu-title">'+menu_heads[i][1]+'</div>')
			for (var j = 0; j < menu_subheads.length; j++){			
				if (menu_heads[i][0] == menu_subheads[j][0]){					
					if (menu_subheads[j][1] == menuitem_id && menu_heads[i][0] == menu_id){						
						document.writeln('	<div class="menupageitem-group">')
						document.writeln('	<div class="menupageitem-title"><div class="menulist-image"><img src="'+icon_dir+'link_arrow_orange.gif" alt="" width="4" height="8" /></div><a title="" href="">'+menu_subheads[j][2]+'</a></div>')
						
						
						var index = toc_location.indexOf("menu")
						if (index > -1){					
							for (var k = 0; k < menu_items.length; k++){
								document.writeln('<div class="menupageitem">&gt;')
								if(menu_items[k][1].charAt(0) == "#"){
									document.writeln('			<a href="'+filename2+menu_items[k][1]+'">'+menu_items[k][0]+'</a>')
								}else{
									document.writeln('			<a href="'+menu_items[k][1]+'">'+menu_items[k][0]+'</a>')
								}							
								document.writeln('</div>')
							}
						}		
					
					
						document.writeln('	</div>')
					}else{
						document.writeln('	<div class="menuitem"><div class="menulist-image"><img src="'+icon_dir+'link_arrow_orange.gif" alt="" width="4" height="8" /></div><a title="" href="'+menu_subheads[j][3]+'">'+menu_subheads[j][2]+'</a></div>')
					}
				}
			}
			document.writeln('</div>')
		}
	}	
	

	document.writeln('<div class="menu-group">')
	document.writeln('	<div class="menu-title">Select an Option</div>')
	
	for (var i = 0; i < menu_heads.length; i++){
	  if (menu_heads[i][0] != menu_id){
		document.writeln('	<div class="menuitem"><div class="menulist-image"><img src="'+icon_dir+'link_arrow.gif" alt="" width="4" height="12" /></div><a href="'+menu_heads[i][2]+'">'+menu_heads[i][1]+'</a></div>')
		/*for (var j = 0; j < menu_subheads.length; j++){			
			if (menu_heads[i][0] == menu_subheads[j][0]){					
				if (menu_subheads[j][1] == menuitem_id && menu_heads[i][0] == menu_id){
					document.writeln('	<div class="menuitem"><div class="menulist-image"><img src="'+icon_dir+'link_arrow_orange.gif" alt="" width="4" height="8" /></div><a title="" href="">'+menu_subheads[j][2]+'</a></div>')
				}else{
					document.writeln('	<div class="menuitem"><div class="menulist-image"><img src="'+icon_dir+'link_arrow_orange.gif" alt="" width="4" height="8" /></div><a title="" href="'+menu_subheads[j][3]+'">'+menu_subheads[j][2]+'</a></div>')
				}
			}
		}*/	  	
	  }
	}
	document.writeln('<div class="menuitem"></div>')
	document.writeln('</div>')
	//document.writeln('<div style="background-image:url(../images/lf_bottom_image.gif);background-repeat:no-repeat;height:68px" colspan="2"></div>')
	w3cValidator()
}




function minitoc(){
	var index = toc_location.indexOf("page")
	if (index > -1 && menu_items.length > 0){
		document.writeln('<div id="minitoc-area">')
		document.writeln('<table cellspacing="0">')
		document.writeln('<tr>')
		document.writeln('	<td>')
		document.writeln('		<ul class="minitoc">')
		for (var i = 0; i < menu_items.length; i++){
			document.writeln('			<li><a href="'+menu_items[i][1]+'">'+menu_items[i][0]+'</a></li>')
		}
		document.writeln('		</ul>')
		document.writeln('	</td>')
		document.writeln('</tr>')
		document.writeln('</table>')
		document.writeln('</div>')
	}
}
	

function w3cValidator(){
	document.writeln('<div class="w3cValidator">')
	document.writeln('<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" title="Valid XHTML 1.0!" height="31" width="88" /></a>')
	document.writeln('</div>')
	document.writeln('<div class="w3cValidator">')
	document.writeln('<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" title="Valid CSS!" /></a>')
	document.writeln('</div>')
}



function pop_other(requrl){
	mywin=window.open("../html/popup.htm","pop_other","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 pop_nic(url){
	mywin=window.open("","pop_nic","width=560,height=350,screenX=125,screenY=100,scrollbars=no,menubar=no,resizable=yes,status=no,toolbar=no,directories=no,location=no");
	mywin.location.href=url;
	mywin.focus();
}



var html_dir = getHtmlPath()
var pdf_dir = getPdfPath()

var menu_heads = new Array(
	new Array("about", "About Us", html_dir+"about_us.htm"),
	new Array("org_structure", "Organisation Structure", html_dir+"organisation_structure.htm"),
	new Array("functions_activities", "Functions &amp; Activities", html_dir+"functions_activities.htm"),
	new Array("services", "Services", html_dir+"services.htm"),
	new Array("statistics", "Statistical Information", html_dir+"statistics.htm"),
	new Array("notification", "Notifications", html_dir+"notifications.htm"),
	new Array("acts_rules", "Acts &amp; Rules", html_dir+"acts_rules.htm"),
	new Array("forms_procedures", "Forms &amp; Procedures", html_dir+"forms_procedures.htm"),
	new Array("rti", "Right to Information", html_dir+"rti.htm"),
	new Array("links", "Important Links", html_dir+"links.htm"),
	new Array("pio", "Public Information Officers", html_dir+"pio.htm"),
	new Array("contacts", "Contact Information", html_dir+"contact_us.htm")
)

var menu_subheads = new Array(
	new Array("contacts", "contact_us", "Contact Us", html_dir+"contact_us.htm"),
	new Array("contacts", "telephone_directory", "Telephone Directory", html_dir+"telephone_directory.htm"),
	new Array("contacts", "feedback", "Your Feedback", html_dir+"feedback.htm")
)