﻿// For custom implementation features

function lawyerBioPrint(lawyerID,recordID){
	LawyerID=lawyerID;
	RecordID=recordID;
	//var url='PrintBio.aspx?LawyerID='+lawyerID+'&RecordID='+recordID;
	sysOpenWindow('PrintBioConfirmation.aspx',300,200);
	//return printPage(url);
}
var LawyerID;
var RecordID;
function continueBioPrint(url){
	var newUrl='PrintBio.aspx?LawyerID='+LawyerID+'&RecordID='+RecordID;
	newUrl+=url;
	return printPage(newUrl);
}

function printPage(url){
	if (window.navigator.userAgent.indexOf("MSIE ")!=-1 && navigator.appVersion.substr(0, 1) >= 4){
		if(window.printHiddenFrame==null){
			window.document.body.insertAdjacentHTML("beforeEnd", "<iframe name='printHiddenFrame' width='0' height='0'></iframe>");
			framedoc=window.printHiddenFrame.document;
			framedoc.open();
			framedoc.write(
				"<frameset name=test onload='printMe.focus();printMe.print();' rows=\"100%\">" +
				"<frame name=printMe src=\""+url+"\">" +
				"</frameset>");
			framedoc.close();
		}
		else{
			framedoc=window.printHiddenFrame.document;
			framedoc.innerHTML='';
			framedoc.open();
			framedoc.write(
				"<frameset name=test onload='printMe.focus();printMe.print();' rows=\"100%\">" +
				"<frame name=printMe src=\""+url+"\">" +
				"</frameset>");
			framedoc.close();
			/*
			window.printHiddenFrame.printMe.focus();
			window.printHiddenFrame.printMe.print();
			*/
		}
	}		
	else{
		window.location.href=url;
	}
	return true;
}