
function getRedirectAuthLink(destination) {
	var returnValue;
	returnValue = $.ajax({
	      url: "/toolbox/tools/stepbystep/stepbystepurl.html?routeurl="+destination,
	      global: false,
	      type: "POST",
		  async: false,
	      dataType: "text"
	   }
	).responseText;
	return returnValue;
}
function launchStepByStepPopup() {
	var redirectUrl ;
	redirectUrl = getRedirectAuthLink("stepbystep.target.destination");
	if (redirectUrl.indexOf('http') > 2) {
		redirectUrl = redirectUrl.substring(redirectUrl.indexOf('http'));
	}
	popPageWithScroll(720,830,redirectUrl,'toolsScroll');
}


//**************************************************************
//* FIT 34907 - bfuller 05/24/10
//*
//* Copying launchStepByStepPopup() logic to save the
//* session info for the plan print friendly pop up 
//* window.
//*
//* See PrinterFriendlyUtils.getOnclickForPDFPrionterFriendly() 
//* for the code that builds the link that calls this function
//**************************************************************

function getPdfRedirectAuthLink(destination) {
	var returnValue;
	
	returnValue = $.ajax({
	      url: "/toolbox/pdfprintfriendlyurl.html?routeurl="+destination,
	      global: false,
	      type: "POST",
		  async: false,
	      dataType: "text"
	   }
	).responseText;

	return returnValue;
}

function launchPDFPrintFriendlyPopup(t, id) {

	var redirectUrl ;

	redirectUrl = getPdfRedirectAuthLink("pdfprintfriendly.target.destination");
	
	if (redirectUrl.indexOf('http') > 2) {
		redirectUrl = redirectUrl.substring(redirectUrl.indexOf('http'));
	}
	redirectUrl = redirectUrl + "&t=" + t + "&id=" + id;
	
	//* function located in print.js
	popPageWithLoc(5,5,redirectUrl, 9000, 9000);  	
}
