// The order the buttons are shown ...
QuickLinksButton1 = "Maps"
QuickLinksButton2 = "VirtualTour"
QuickLinksButton3 = "YourHealthInformation"
QuickLinksButton4 = "EmergencyCare"
QuickLinksButton5 = "PayYourBill"
QuickLinksButton6 = "HealthEducationLibrary"
QuickLinksButton7 = "SendUsFeedback" // removed temporarily, delete the first '//' to return it, slr.

// * Note: You can add or remove as many you wish, but this list must remain sequential (ie don't skip a number).


// Button details: label, link, images ...	
// The order below IS NOT related to the order being shown on the homepage. 
// See the code above to change the order.
QuickLinks_VirtualTour_Label = "Virtual Tour";
QuickLinks_VirtualTour_Link = "http://www.bluelemonclient.com/nygh/";
QuickLinks_VirtualTour_Circle = "ql_SouthBuilding.gif"; // This is the regular state image ...
QuickLinks_VirtualTour_CircleRollOver = "ql_SouthBuilding_over.gif"; // This is the mouseover.
	
QuickLinks_EmergencyCare_Label = "Emergency Care";
QuickLinks_EmergencyCare_Link = "programs/emergency_need.html";
QuickLinks_EmergencyCare_Circle = "ql_SmilingDoctor.gif";
QuickLinks_EmergencyCare_CircleRollOver = "ql_SmilingDoctor_over.gif";

QuickLinks_Maps_Label = "Maps And Directions";
QuickLinks_Maps_Link = "patient-visitors/maps.html";
QuickLinks_Maps_Circle = "ql_MapsAndDirections.gif";
QuickLinks_Maps_CircleRollOver = "ql_MapsAndDirections_over.gif";
	
QuickLinks_YourHealthInformation_Label = "Your Health Information";
QuickLinks_YourHealthInformation_Link = "patient-visitors/your_health-information.html";
QuickLinks_YourHealthInformation_Circle = "ql_SmilingWoman.gif";
QuickLinks_YourHealthInformation_CircleRollOver = "ql_SmilingWoman_over.gif";
	
QuickLinks_PayYourBill_Label = "Pay Your Hospital Bill Online";
QuickLinks_PayYourBill_Link = "javascript:toUNP();";
QuickLinks_PayYourBill_Circle = "ql_Mouse.gif";
QuickLinks_PayYourBill_CircleRollOver = "ql_Mouse_over.gif";
	
QuickLinks_SendUsFeedback_Label = "Send Us Your Feedback";
QuickLinks_SendUsFeedback_Link = "javascript:window.open('patient-visitors/Survey08_web.html','Survey','menubar=no,scrollbars=yes,toolbars=no,resizable=no,location=no,width=820,height=600');";
QuickLinks_SendUsFeedback_Circle = "ql_ElderlyCouple.gif";
QuickLinks_SendUsFeedback_CircleRollOver = "ql_ElderlyCouple_over.gif";
	
QuickLinks_HealthEducationLibrary_Label = "Health Education Library";
QuickLinks_HealthEducationLibrary_Link = "education/che_library.html";
QuickLinks_HealthEducationLibrary_Circle = "ql_MotherAndChild.gif";
QuickLinks_HealthEducationLibrary_CircleRollOver = "ql_MotherAndChild_over.gif";
	


// Preload code - this is where we preload the images as set above ...
OurCount = 0
QuickLinks_ThisQuickLinksExists = true;
	
// We're going to check for the existance of QuickLinksButton1, QuickLinksButton2, QuickLinksButton3 ... until
// it no longer exists - this way, PR can just add or remove variables above and not have to change any code here
while (QuickLinks_ThisQuickLinksExists) { // As long as we can still find a link ...
		
	OurCount = OurCount + 1 // Figure out which button number we're targeting
	
	if (eval("typeof(QuickLinksButton"+OurCount+")") == "undefined") {
		QuickLinks_ThisQuickLinksExists = false; // if the target link does not exist, we stop the loop
	} else {
		
		
		ThisQuickLink_Descriptor = eval("QuickLinksButton"+OurCount)
				
		//alert(ThisQuickLink_Descriptor)
		ThisQuickLink_Circle = eval("QuickLinks_" + ThisQuickLink_Descriptor + "_Circle");
		ThisQuickLink_CircleRollOver = eval("QuickLinks_" + ThisQuickLink_Descriptor + "_CircleRollOver");
			
		if (document.images) {
	      eval("preload_image"+OurCount+" = new Image();") 
   		  eval("preload_image"+OurCount+".src=\"images/buttons/\"+ThisQuickLink_CircleRollOver;") 
		 // alert(preload_image.src);
   		}
			
	}
		
}
	

// Pre load code - this is where we preload the permanent images - the background for the buttons
preload_image_bgtopover = new Image();
preload_image_bglabelover = new Image();
	
preload_image_bgtopover.src = "images/buttons/ql_bg_top_over.gif"
preload_image_bglabelover.src = "images/buttons/ql_bg_label_over.gif"

preload_image_bgtop = new Image();
preload_image_bglabel = new Image();
	
preload_image_bgtop.src = "images/buttons/ql_bg_top.gif"
preload_image_bglabel.src = "images/buttons/ql_bg_label.gif"
	
// Changes background images for button on rollover, 02/13/08, slr.
function QL_Change(TargetName,TargetImage,TargetState) {
		
	if (TargetState == "over") {
		document.all[TargetName + '_Top'].style.background = "url(images/buttons/ql_bg_top_over.gif)";
		document.all[TargetName + '_Label'].style.background = "url(images/buttons/ql_bg_label_over.gif)";	
		document.all[TargetName + '_Circle'].style.background = "url(images/buttons/" + TargetImage + ")";				
	} else {
		document.all[TargetName + '_Top'].style.background = "url(images/buttons/ql_bg_top.gif)";
		document.all[TargetName + '_Label'].style.background = "url(images/buttons/ql_bg_label.gif)";		
		document.all[TargetName + '_Circle'].style.background = "url(images/buttons/" + TargetImage + ")";			
	}
}


// This is the functionality that actually writes the buttons, slr.
function WriteQuickLinks() {
		
	OurCount = 0
	QuickLinks_ThisQuickLinksExists = true;
	
	
	// We're going to check for the existance of QuickLinksButton1, QuickLinksButton2, QuickLinksButton3 ... until
	// it no longer exists - this way, PR can just add or remove variables above and not have to change any code here
	while (QuickLinks_ThisQuickLinksExists) { // As long as we can still find a link ...
		
		OurCount = OurCount + 1 // Figure out which button number we're targeting
	
		if (eval("typeof(QuickLinksButton"+OurCount+")") == "undefined") {
			QuickLinks_ThisQuickLinksExists = false; // if the target link does not exist, we stop the loop
		} else {
				
			ThisQuickLink_Descriptor = eval("QuickLinksButton"+OurCount)
				
			//alert(ThisQuickLink_Descriptor)
				
			ThisQuickLink_Label = eval("QuickLinks_" + ThisQuickLink_Descriptor + "_Label");
			ThisQuickLink_Link = eval("QuickLinks_" + ThisQuickLink_Descriptor + "_Link");
			ThisQuickLink_Circle = eval("QuickLinks_" + ThisQuickLink_Descriptor + "_Circle");
			ThisQuickLink_CircleRollOver = eval("QuickLinks_" + ThisQuickLink_Descriptor + "_CircleRollOver");
				
			if (ThisQuickLink_Link.indexOf("http") != -1 && ThisQuickLink_Link.indexOf("nygh.on.ca") == -1) {
				ThisQuickLink_OnClickCall = "window.open('" + ThisQuickLink_Link + "','New','menubar=yes');"
			} else if (ThisQuickLink_Link.indexOf("javascript:") != -1) {
				ThisQuickLink_OnClickCall = ThisQuickLink_Link.replace("javascript:","");
			} else {
				ThisQuickLink_OnClickCall = "window.location='" + ThisQuickLink_Link + "'"
			}
			
			//alert(ThisQuickLink_OnClickCall);
			// Write out each button	
			
			//document.write('<a href="gg.html" target=new><div>')
			// Table
			document.write('<table class="ql_button" cellpadding=0 cellspacing=0 border=0 name="Button' + OurCount + '_Table" id="Button' + OurCount + '_Table" OnMouseOver="Javascript:QL_Change(\'Button' + OurCount + '\',\''+ ThisQuickLink_CircleRollOver + '\',\'over\');" OnMouseOut="Javascript:QL_Change(\'Button' + OurCount + '\',\''+ ThisQuickLink_Circle + '\',\'off\');" width=188 height=48 onclick="' + ThisQuickLink_OnClickCall + '">');
				
				// First row - circle and header
				document.write('<tr>')
				
					// Circle column
					document.write('<td class="ql_circle" rowspan=2 name="Button' + OurCount + '_Circle" id="Button' + OurCount + '_Circle" width=49 height=48 valign=top>')
					document.write('</td>')
					
					// top bg
					document.write('<td class="ql_top" name="Button' + OurCount + '_Top" id="Button' + OurCount + '_Top" width=139 height=10 valign=top></td>')
				
				document.write('</tr>')
				
				// Second row - just label, the circle spans both rows
				document.write('<tr>')
				
					// Label td
					document.write('<td class="ql_label" name="Button' + OurCount + '_Label" id="Button' + OurCount + '_Label"><div class="ql_label_text" width=139 height=38 valign=top>')
					document.write('<a href="#"><strong>' + ThisQuickLink_Label + '</strong></a></div>')
					document.write('</td>')
					
				document.write('</tr>')
				
			document.write('</table>')
	
			//document.write('</div></a>')
			// Sets landing state for images	
			QL_Change('Button' + OurCount,ThisQuickLink_Circle,'off');
				
		}
		
	}
		
}
	