//Generating New page for Print Preview
function GetPrintableVersion(CompanyName,MagnavoxWay,FortWayne,Title)
{
  	//PhoneID is the id of the Div tag containing the PhoneNumber of AonCorporation on the page that is to be printed 
    var valuePhone=document.getElementById("PhoneID").innerHTML;

   	//FAXID is the id of the Div tag containing the FaxNumber of AonCorporation on the page that is to be printed 
    var valueFax=document.getElementById("FAXID").innerHTML;
   	
   	//ClaimsID is the id of the Div tag containing the ClaimsNumber of AonCorporation on the page that is to be printed 
    var valueClaims=document.getElementById("ClaimsID").innerHTML;

    //Creating new page
    var  PrintableVersion = window.open(''+self.location,'PrintPreview','');
    
    //Adding HTML opening tag with linls to the required CSS files to the new Page
    var HtmlForprintableVersion='<html><head><title>'+Title+'</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">';
	HtmlForprintableVersion=HtmlForprintableVersion+'<link type="text/css" rel="stylesheet" href="/_layouts/KKCommon/Styles/AONCommon.css" /><link type="text/css" rel="stylesheet" href="/_layouts/KKSports/Styles/AONStyle.css" /> ';     
   	HtmlForprintableVersion=HtmlForprintableVersion+'<style type="text/css">td{font-size:11px;}</style>';
   	HtmlForprintableVersion=HtmlForprintableVersion+'<script type="text/javascript" language="javascript">function showKeyCode(evt){';
   	HtmlForprintableVersion=HtmlForprintableVersion+'var F5 = 116;';
	HtmlForprintableVersion=HtmlForprintableVersion+'if (evt.keyCode == F5 && evt.ctrlKey){';
	HtmlForprintableVersion=HtmlForprintableVersion+'window.print();return false;}';
	HtmlForprintableVersion=HtmlForprintableVersion+'}</script></head>';
    //Adding Body Tag to the New Page
  	HtmlForprintableVersion=HtmlForprintableVersion+'<body onkeypress="return showKeyCode(event)"><div class="printouter"><table class="printcontentpanel" cellspacing="0" cellpadding="0" border="0"><tr>';
  	HtmlForprintableVersion=HtmlForprintableVersion+'<td class="printlogobar2"><table cellpadding="0" cellspacing="0" width="100%"><tr><td>';
  	
  	//Give the correct Path for the image file
  	HtmlForprintableVersion=HtmlForprintableVersion+'<img src="/sites/KKCommon/PublishingImages/AONLogo.jpg">';
   	HtmlForprintableVersion=HtmlForprintableVersion+'</td><td align="right"><b>';
   	
   	//CompanyName,MagnavoxWay and FortWayne are the address components passed from the calling page.  
   	HtmlForprintableVersion=HtmlForprintableVersion+CompanyName+'</b><br />'+MagnavoxWay+'<br />'+FortWayne+'<br />Phone : '+valuePhone+'<br />Fax : '+valueFax+'<br />Claims : '+ valueClaims;
   	HtmlForprintableVersion=HtmlForprintableVersion+' </td></tr></table></td></tr>';

   	HtmlForprintableVersion=HtmlForprintableVersion+'<tr><td>&nbsp;</td></tr><tr ><td>Printable View for > <span class="contentheading">';
    HtmlForprintableVersion=HtmlForprintableVersion+document.getElementById('TitleMain').innerHTML;
   	HtmlForprintableVersion=HtmlForprintableVersion+'</span></td></tr><tr><td>&nbsp;</td></tr>';
   	HtmlForprintableVersion=HtmlForprintableVersion+'<tr><td>';
   	
   	//PrintContent is the id of the Div tag containing the Content on the page that is to be printed 
   	HtmlForprintableVersion=HtmlForprintableVersion+document.getElementById('PrintContent').innerHTML;
   	HtmlForprintableVersion=HtmlForprintableVersion+'</td></tr><tr><td>&nbsp;</td></tr>';
   	HtmlForprintableVersion=HtmlForprintableVersion+'<tr><td class="footer">';
   	
 	//PrintFooterLine1 is the id of the Div tag that contains the footer firstline
   	HtmlForprintableVersion=HtmlForprintableVersion+document.getElementById('Footer_MidContent1').innerHTML;
   	HtmlForprintableVersion=HtmlForprintableVersion+'</td></tr><tr><td class="footer">';
   	
 	//PrintFooterLine2 is the id of the Div tag that contains the footer secondline
   	HtmlForprintableVersion=HtmlForprintableVersion+document.getElementById('Footer_Content4').innerHTML;
   	HtmlForprintableVersion=HtmlForprintableVersion+'</td></tr>';

    HtmlForprintableVersion=HtmlForprintableVersion+'</table></div>';
    HtmlForprintableVersion=HtmlForprintableVersion+'</body></html>';
    
    PrintableVersion.document.open(); 
    PrintableVersion.document.write(HtmlForprintableVersion);  
 	PrintableVersion.document.close();         
 }  

