// Function used to remove the printmode when needed
function RemovePrintToOpenerForm()
	{
		if( window.opener )
		{
			var strAction = window.opener.Form1.action;
			if (strAction.indexOf("?printmode=true&") >= 0)
			{
				window.opener.Form1.target = "";
				strAction = strAction.replace("?printmode=true&", "?");
			}
			else if (strAction.indexOf("&printmode=true&") >= 0)
			{
				window.opener.Form1.target = "";
				strAction = strAction.replace("&printmode=true&", "&");
			}	
			else if (strAction.indexOf("&printmode=true") >= 0)
			{
				window.opener.Form1.target = "";
				strAction = strAction.replace("&printmode=true", "");
			}
			else if (strAction.indexOf("?printmode=true") >= 0)
			{
				window.opener.Form1.target = "";
				strAction = strAction.replace("?printmode=true", "");
			}
		
			window.opener.Form1.action = strAction;
		}
	}

