
// getPrint function open a new page for print preview including 
// the user's desired content, header and footer for the printing paper.
// all what you need just to pass the desired <div> id to be loaded in the new page.
// done by Mohannad Rabie 03-Aug-2007 

function getPrint(print_area)
		{	
			//Creating new page
			// pp : print page.
			
			var pp = window.open();
			pp.document.writeln('<HTML><HEAD><title>Print Preview</title><LINK href="/Style%20Library/en.css"  type="text/css" rel="stylesheet" media="print"><LINK href="/Style%20Library/en.css"  type="text/css" rel="stylesheet">')
			pp.document.writeln('</HEAD>');
			pp.document.writeln('<body style="background-color:White;height:100%" >');
			
			pp.document.writeln('<form  method="post"><div style="background-color:White;" >');
			pp.document.write('<div class="Printlogo">');
            pp.document.write('<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td width="41" align="left"><img src="/style library/images/english/Printlogo.jpg" width="41" height="40px" /></td><td align="left" class="DateTime1">Government of Ajman</br>Municipality & Planning Dept </td><td align="right"  class="DateTime1">حكومة عجمان</br>دائرة البلدية والتخطيط</td><td align="right" width="41"><img src="/style library/images/english/Printlogo.jpg" width="41" height="40px" /></td></tr></table>');
			
			pp.document.write('</br></br>');
            pp.document.write('</div>');
            pp.document.write('<div class="DateTime">');
			
			//pp.document.writeln(document.getElementById(picture).innerHTML);
	
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
var url="/usercontrols/date.aspx?lang=1&a="+Date();
xmlHttp.open("GET", url, false);
xmlHttp.send();
var xmlDoc=xmlHttp.responseText ;

pp.document.write(xmlDoc)			


			pp.document.write('</div>');
			pp.document.writeln('<TABLE id="tblPrint" class="PrintContent" width=100%><TR><TD></TD></TR><TR><TD align=right><INPUT ID="PRINT" class="PrintButton" type="button" value="Print" onclick="javascript:printPage();">    <INPUT class="CloseButton" ID="CLOSE" type="button" value="Close" onclick="window.close();"></TD></TR><TR><TD></TD></TR></TABLE>');
			pp.document.writeln(document.getElementById(print_area).innerHTML);
			
		
			pp.document.writeln(' <div class="TotalVoteCountStyle1">Contact info : Ajman - United Arab Emirates - P.O.Box:3<br> Tel : +971 (6 ) 7422331<br> Fax : +971 (6 ) 7423576<br> Email :  info@am.gov.ae<br> Portal: www.am.gov.ae<br>Municipality & Planning Dept-Ajman </div></div></form></body><script language="javascript">function printPage(){location.reload(true);window.print();}</script></HTML>');			
		}





