// JavaScript Document

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

function printSpecial(divname)
{
	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 +='<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Welcome to SevenTelecom Home &amp; Away</title><link href="css/print.css" rel="stylesheet" type="text/css" /><link href="css/mainnav.css" rel="stylesheet" type="text/css" /><link href="css/style.css" rel="stylesheet" type="text/css" /><link rel="shortcut icon" href="image/favicon.ico">';
		
		html += '\n</HE' + 'AD>\n<BODY >\n';
		
		var printReadyElem = document.getElementById(divname);
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO' + 'DY>\n</HT' + 'ML>';
		
		 if (document.all || document.getElementByID)
       		 var xMax = screen.width, yMax = screen.height;
   		else
       	 if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
       	 else
            var xMax = screen.width, yMax = screen.height;
			
	    var xOffset = (xMax - 800)/2, yOffset = (yMax - 600)/2; 
		var printWin = window.open("","Consultant", 'toolbar=No,location=No,status=no,menubar=No,scrollbars=yes,resizable=yes,width=700,height=650,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
			
		
		var printWin = window.open("","Consultant");
		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.");
	}
	
	return false;
}

