<!-- Built by Brad Judson    -->
<!-- July 2, 2003 14:00    -->

var ReviewHelp = "ReviewHelp";
var ReportHelp = "ReportHelp";
var PrintingTip = "Print";
var SaveTip = "zzz";
var defaultHelp = "There is no additional online information on this question.  Please contact <A HREF=\"mailto:david.tomaz@gov.bc.ca\">David Tomaz</A> for more information.";


//section variables
var P0 = "P0";   //administration
var P23 = "P23"; //hrva
var P42 = "P42";
var P56 = "P56";
var P73 = "P73";
var P106 = "P106";
var P114 = "P114";


//function updateTotalDisplay(){
//		document.review.elements["CT0"].value = actScore[1];
//		document.review.elements["CT32"].value = actScore[2];
//alert(actScore[1]);	
//}



function helptip(tipID){
//	alert(tipID);
	var plist = "";
	if (tipID=="Print"){
		plist = "How do I print the background colours?:";
		plist = plist +"<BR>   " + "Internet Explorer 5: ";
		plist = plist +"<BR>       " + "1.  Click \"Tools\", then click on \"Internet Options\".";
		plist = plist +"<BR>       " + "2.  Click \"Advanced\" tab and scroll down to the \"Printing\" section.";
		plist = plist +"<BR>       " + "3.  Ensure that the box \"Print background colours and images\" is checked. ";
		plist = plist +"<BR>       " + "4.  Click OK button.";
	}
	else if (tipID=="Save"){
//		plist = webURL + "review.html?choices=" + ArrayArg;
		plist = webURL + "review.html?choices=" + ArrayArg + "&authority=" + authority + "&user="  + user + "&version=" + version;
		SaveTip ="save";
	}
	else if (tipID=="ReviewHelp"){
		plist = "There are two steps to using this Community Emergency Program Review tool.";
		plist = plist +"<BR> " + "";
		plist = plist +"<BR>       " + "Step 1. Respond to each question by choosing yes, no, in progress, or don\'t know.";
		plist = plist +"<BR>       " + "Step 2. Review the graph and report.";
		plist = plist +"<BR> " + "";
		plist = plist +"<BR>" + "More information on each question may be available by choosing \"More Info\".";
		plist = plist +"<BR> " + "";
		plist = plist +"<BR> " + "This application will not function in Netscape.  Please user Internet Explorer 4 or later with your monitor set to 800x600 or higher.  To print background colours, you must have this option enabled in your browser settings.";

	}

	else if (tipID=="ReportHelp"){
		plist = "This report provides a comparative graph of possible and actual scores.";
		plist = plist +"<BR> " + "";
		plist = plist +"<BR>   " + "For each section in the program review your <i>possible score </i>is indicated by the blue vertical bar.  Your <i>actual score </i>is indicated by the green, yellow, orange or red vertical bar";
		plist = plist +"<BR> " + "";
		plist = plist +"<BR>   " + "A list of all criteria where \"No\" or \"Don't Know\" was selected is also provided.";

	}

	else if (substring2(tipID,0,1)=="P"){
	//strip the "P" from the select control name to return the number corrosponding to the hazard ID
		var pControlNum =substring2(tipID,1,tipID.length)
		if(review[pControlNum][6]=="&nbsp"){
			plist = defaultHelp
		}
		else{
			plist = review[pControlNum][6] ;
		}
	}
	else{
		plist = defaultHelp;
	}

	LaunchModal(plist);
	//alert(plist);

}

function LaunchModal(plist){

	if(SaveTip=="save"){
		var vReturnValue=showModalDialog("eprsave.html", plist,"dialogWidth:600px;dialogHeight:410px;status=0;center:true;help=0;resizable=0;");

	}
	else{
		var vReturnValue=showModalDialog("eprhelp.html", plist,"dialogWidth:600px;dialogHeight:410px;status=0;center:true;help=0;resizable=0;");
	}

	if (vReturnValue == -1 || vReturnValue== null){
		//alert('The modal window is closed w/o using the buttons');
	}
	else{
		if (vReturnValue == ""){
			//alert('Nothing is entered in text box')
		}
		else{
			//document.all("txtResults").value=vReturnValue;  //use this to receive info back in parent html form
		}
	}
}



