﻿// JScript File
var gAutoPrint = true
    function printRep(prnRep) 
	{ 
	    
		if (document.getElementById != null) 
		{ 
			var html = '<HTML>\n<HEAD>\n'; 
			html += '<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">\n'
			html += '<link media="all" href='+strStylePath+' type="text/css" rel="stylesheet">\n'
			if (document.getElementsByTagName != null) 
			{ 
				var headTags = document.getElementsByTagName("head"); 
			} 
			
			if (gAutoPrint) 
			{ 
				if (navigator.appName == "Microsoft Internet Explorer") 
				{ 
					html += '\n\n<'
					html += 'BODY onLoad="PrintCommandObject.ExecWB(6, -1);" dir="'+strDir+'">\n<font face="Tahoma" style="font-size: 11pt" color="#000000"></font>'; 
				} 
				else 
				{ 
					html += '\n\n<BODY dir="'+strDir+'">\n<font face="Tahoma" style="font-size: 11pt" color="#000000">&nbsp;Tajplus</font>'; 
				} 
			} 
			else 
			{ 
				html += '\n\n<BODY dir="'+strDir+'">\n<font face="Tahoma" style="font-size: 11pt" color="#000000">&nbsp;Tajplus</font>'; 
			} 
			var printReadyElem = document.getElementById(prnRep); 
			if (printReadyElem != null) 
			{ 
				html +=  printReadyElem.innerHTML; 
			} 
			else 
			{ 
				alert("Could not find the printReady section in the HTML"); 
				return; 
			}
			if (gAutoPrint) 
			{ 
				if (navigator.appName == "Microsoft Internet Explorer") 
				{ 
					html += '<OBJECT ID="PrintCommandObject" WIDTH=0 HEIGHT=0 '
					html += 'CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">\n\n'; 
				} 
				else 
				{ 
					html += '\n\n'; 
				} 
			} 
			else 
			{ 
				html += '\n\n'; 
			} 
			var printWin = window.open("","printSpecial"); 
			printWin.document.open(); 
			printWin.document.write(html); 
			printWin.document.close();
			if (gAutoPrint) 
			{ 
				if (navigator.appName != "Microsoft Internet Explorer") 
				{ 
					printWin.print(); 
				}
			}
		} 
		else 
		{ 
			alert("Sorry, the print ready feature is not available in this browser.");
		}
	}


