var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null){
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0){
				html += headTags[0].innerHTML;
			}
	
			html += '\n</HE' + 'AD>\n<BODY>\n';
		}
		var printReadyElem = document.getElementById("printReady");
		if (printReadyElem != null){
			html += printReadyElem.innerHTML;
			var newHTML=html.replace('<img src="/style/default/printer_friendly.gif" alt="printer friendly" align="right" border="0">','');
			html=newHTML;
		}
		else{
			//No print class divtags
			alert("This page has not been configured for printing.");
			return;
		}

		var pageLocation=document.location+'';
			
		//bottom blue line	
		html += '<table width="100%">';
		html += '<tr bgcolor="#3e72ae">	<td colspan="2"><img src="/gif/1by1.gif" height="2" width="1" /><br></t'+'d></t'+'r>';
		html += '<tr><td><img src="http://www.gov.pe.ca/gif/stylesheet/hrclogo.gif" align="left" /></'+'td>';
		html += '<td width="90%">';
		html += '<b>This information has been taken from www.gov.pe.ca/humanrights</b><br />';
		html += '<b>URL:</b> <i>'+pageLocation.replace('\&','\&amp;')+'</i><BR /><BR />';
		html += '</'+'td>';
		html += '</'+'tr>';
		html += '</ta'+'ble>';
		//disclaimer
		html += '<BR />';
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint){
			//printWin.print();
		}
	}
	else{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}
/*
  French version of printSpecial
*/
function printSpecialf()
{
	if (document.getElementById != null){
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0){
				html += headTags[0].innerHTML;
			}

			html += '\n</HE' + 'AD>\n<BODY>\n';
		}
		var printReadyElem = document.getElementById("printReady");
		if (printReadyElem != null){
			html += printReadyElem.innerHTML;
			var newHTML=html.replace('<img src="/style/default/printer_friendly_F.gif" alt="Version Imprimable" align="right" border="0">','');
			html=newHTML;
		}
		else{
			//No print class divtags
			alert("This page has not been configured for printing.");
			return;
		}

		var pageLocation=document.location+'';

		//bottom blue line
		html += '<table width="100%">';
		html += '<tr bgcolor="#3e72ae">	<td colspan="2"><img src="/gif/1by1.gif" height="2" width="1" /><br></t'+'d></t'+'r>';
		html += '<tr><td><img src="http://www.gov.pe.ca/gif/stylesheet/hrclogo.gif" align="left" /></'+'td>';
		html += '<td width="90%">';
		html += '<b>This information has been taken from www.gov.pe.ca/humanrights</b><br />';
		html += '<b>URL:</b> <i>'+pageLocation.replace('\&','\&amp;')+'</i><BR /><BR />';
		html += '</'+'td>';
		html += '</'+'tr>';
		html += '</ta'+'ble>';
		//disclaimer
		html += '<BR />';
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint){
			//printWin.print();
		}
	}
	else{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}

