﻿function PrintPage()
{
	if (document.getElementById != null)
	{
		var logo='/Style%20Library/itidaImages/logo.gif';
		var siteName='Egypt-on';
		var cssPath='/Style Library/ITIDAstyles/ITIDAstyle.css';
		var name='Printable version'
		var html = '<HTML>\n<HEAD>\n';
		html += '<link href=\"'+cssPath+'\" rel=\"stylesheet\" type=\"text/css\">';
		html +='<style>';
		html +='Body{Background:#fff!important;}';
		html +='</style>';
		html += '\n</HEAD>\n<BODY>\n';
		html +='';
		html +='<div class="Padding10" style="width:650px">';
		html +='<div style="width:100%;overflow:hidden;">';
		html +='<table border="0" width="100%"><tr><td width="50%"><img src="'+logo+'" /></td>';
		html +='<td width="50%" align="right"><h2>'+siteName+'</h2></td>';
		html +='</tr></table></div>';
		/*html +='<div class="clearboth"><img src="/Style Library/RDI_Images_En/spacer.gif" height="20px" /></div>';*/
		html +='<hr />';
		html +='<div class="PaddingTop10">';
		var printReadyElem = document.getElementById('PrintableArea');
		if (printReadyElem != null)
			html += printReadyElem.innerHTML;
		else
		{
			alert("Could not find the print ready section in the HTML");
			return;
		}
		html +='</div>';
		html +='</div>';
		html += '\n</BODY>\n</HTML>';
		
		var printWin = window.open('','','toolbar=0,location=0,directories=0,status=1,menubar=no,scrollbars=yes,resizable=no,width=700,height=550');
		printWin.document.write(html);
		printWin.document.close();
		if (printReadyElem != null)
			printWin.print();	
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}
