/* ---------
 	cyImgLink("", //discription (Mouse over text)
			"", //image file
			"",  // link url
			false); // open link in new window

----------- */


/* links for Building Standards branch */
function cyBuildingStandards() {
 	cyImgLink("Building Permits", //discription (Mouse over text)
			"buildingpermitsthumb.gif", //image file
			"/DEPARTMENTS/Community%20Services/Building%20Standards/Permits/Pages/Permits.aspx",  // link url
			false); // open link in new window




	
}


/* links for Land branch*/
function cyLand() {
 	cyImgLink("Hampton Village", //discription (Mouse over text)
			"hamptonthumb.gif", //image file
			"/DEPARTMENTS/Community%20Services/Land/ResidentialLots/Pages/Hampton%20Village.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Willowgrove", //discription (Mouse over text)
			"willowgrovethumb.gif", //image file
			"/DEPARTMENTS/Community%20Services/Land/ResidentialLots/Willowgrove/Pages/default.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Evergreen", //discription (Mouse over text)
			"evergreenthumb.gif", //image file
			"/DEPARTMENTS/Community%20Services/Land/ResidentialLots/Pages/Evergreen.aspx",  // link url
			false); // open link in new window

	cyImgLink("Rosewood", //discription (Mouse over text)
			"rosewoodthumb.gif", //image file
			"/DEPARTMENTS/Community%20Services/Land/ResidentialLots/Pages/Rosewood.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Industrial Lots", //discription (Mouse over text)
			"industrialthumb.gif", //image file
			"/DEPARTMENTS/Community%20Services/Land/IndustrialLots/IndustrialLandforSale/Pages/Land%20For%20Sale.aspx",  // link url
			false); // open link in new window

 

	
}


/* links for Leisure Services */
function cyLeisureServices() {
	
	cyImgLink("Golf Online Booking", //discription (Mouse over text)
			"latenightice.jpg", //image file
			"http://www.saskatoon.ca/DEPARTMENTS/Community%20Services/LeisureServices/FallWinterFacilities/Pages/IndoorRinks.aspx",  // link url
			false); // open link in new window


	cyImgLink("Leisure Guide", //discription (Mouse over text)
			"LG_cover_rt_nav.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Pages/LeisureGuide.aspx",  // link url
			false); // open link in new window

	cyImgLink("Drop-in Online", //discription (Mouse over text)
			"dropinonline_100px.jpg", //image file
			"/DEPARTMENTS/COMMUNITY%20SERVICES/LEISURESERVICES/LEISURECENTREDROPINSCHEDULES/Pages/LeisureCentreDropInSchedules.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Leisure Online", //discription (Mouse over text)
			"leisure_online_new.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Leisure%20Online/Pages/default.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Leisure Services", //discription (Mouse over text)
			"enewsletter_signup_rightnav.jpg", //image file
			"http://eepurl.com/b32B1",  // link url
			false); // open link in new window

 	cyImgLink("Admission Rates", //discription (Mouse over text)
			"ratecardad.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Documents/indoorratecard.pdf",  // link url
			false); // open link in new window


 	cyImgLink("Pool Parties", //discription (Mouse over text)
			"poolpartiesad.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Documents/poolparties.pdf",  // link url
			false); // open link in new window

 	cyImgLink("Public Swims", //discription (Mouse over text)
			"publicswimad.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Leisure%20Centres/Pages/PublicSwimming.aspx",  // link url
			false); // open link in new window

	
}

/* links for Community Developement */
function cyCommunityDevelopment() {
	cyImgLink("Volunteer!", //discription (Mouse over text)
			"volunteerimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Community%20Associations/Pages/VolunteerforyourCommunityAssociation.aspx",  // link url
			false); // open link in new window

        cyImgLink("Grants", //discription (Mouse over text)
			"grantsimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Pages/Grants.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Leisure Guide", //discription (Mouse over text)
			"LG_cover_rt_nav.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Pages/LeisureGuide.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Cultural Capital of Canada", //discription (Mouse over text)
			"capitalimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Cultural%20Capitals%20of%20Canada%202006/Pages/Cultural%20Capitals%20of%20Canada%202006.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Cultural Diversity and Race Relations", //discription (Mouse over text)
			"cdrrimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Cultural%20Diversity%20and%20Race%20Relations/Pages/Cultural%20Diversity%20and%20Race%20Relations.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Immigration", //discription (Mouse over text)
			"immigrationimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Immigration/Pages/Immigration.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Reducing Graffiti", //discription (Mouse over text)
			"graffitiimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Pages/ReducingGraffitiinourCommunity.aspx",  // link url
			false); // open link in new window

	
}

/* links for Planning & Development */
function cyPlanningDevelopment() {
 	cyImgLink("South East Concept Plan", //discription (Mouse over text)
			"seconceptplan.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/FutureGrowth/SaskatoonPlanningDistrict/Pages/SouthEastConceptPlan.aspx",  // link url
			true); // open link in new window

 	cyImgLink("Bylaw Review", //discription (Mouse over text)
			"pleasanthill100.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/NeighbourhoodPlanning/Housing/Pages/MortgageFlexibilitiesSupportProgram.aspx",  // link url
			true); // open link in new window


	cyImgLink("Bylaw Review", //discription (Mouse over text)
			"commercial_and_industrial_study.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/FutureGrowth/Pages/CIDStudy.aspx",  // link url
			true); // open link in new window

	cyImgLink("Business Start-Up Guide", //discription (Mouse over text)
			"business_guide_button.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/BusinessLicenseMappingAndResearch/BusinessStart-UpGuide/Pages/default.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Housing Handbook", //discription (Mouse over text)
			"housinghandbook.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/Documents/Neighbourhood%20Planning/Housing_Handbook.pdf",  // link url
			false); // open link in new window

 	cyImgLink("Naming Saskatoon", //discription (Mouse over text)
			"namingad.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/Documents/naming.pdf",  // link url
			false); // open link in new window

 	cyImgLink("Planning Education Program", //discription (Mouse over text)
			"PEPCover_side_bar_web.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/NeighbourhoodPlanning/Pages/PlanningEducationProgram.aspx",  // link url
			false); // open link in new window

	cyImgLink("Urban Design", //discription (Mouse over text)
			"Urban_Design.jpg", //image file
			"/DEPARTMENTS/Community%20Services/PlanningDevelopment/UrbanDesign/Pages/default.aspx",  // link url
			false); // open link in new window

	
}

/* links for Training Site*/
function cyTraining() {
	cyImgLink("Download Acrobat", //discription (Mouse over text)
			"getacro.gif", //image file
			"http://www.adobe.com/products/acrobat/readstep.html",  // link url
			true); // open link in new window
	

 	cyImgLink("Volunteer!", //discription (Mouse over text)
			"volunteerimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Community%20Associations/Pages/VolunteerforyourCommunityAssociation.aspx",  // link url
			false); // open link in new window

        cyImgLink("Grants", //discription (Mouse over text)
			"grantsimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Pages/Grants.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Leisure Guide", //discription (Mouse over text)
			"LG_cover_rt_nav.jpg", //image file
			"/DEPARTMENTS/Community%20Services/LeisureServices/Pages/LeisureGuide.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Cultural Capital of Canada", //discription (Mouse over text)
			"capitalimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Cultural%20Capitals%20of%20Canada%202006/Pages/Cultural%20Capitals%20of%20Canada%202006.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Cultural Diversity and Race Relations", //discription (Mouse over text)
			"cdrrimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Cultural%20Diversity%20and%20Race%20Relations/Pages/Cultural%20Diversity%20and%20Race%20Relations.aspx",  // link url
			false); // open link in new window

 	cyImgLink("Immigration", //discription (Mouse over text)
			"immigrationimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Immigration/Pages/Immigration.aspx",  // link url
			false); // open link in new window


 	cyImgLink("Reducing Graffiti", //discription (Mouse over text)
			"graffitiimagelink.jpg", //image file
			"/DEPARTMENTS/Community%20Services/Communitydevelopment/Pages/ReducingGraffitiinourCommunity.aspx",  // link url
			false); // open link in new window

	
}

/* ************************************************************************** */

/* main function: determine Community Services branch and display the appropriate image links*/
function cyDisplayLinks() {
	var id = (location.pathname).substring(34, 38).toLowerCase();

	document.write('<table style="width: 100px" cellpadding="6" border=0>');	

	if (id == 'buil') {
		cyBuildingStandards();
	} else if (id == 'city') {
		cyCityPlanning();
	} else if (id == 'deve') {
		cyDevelopmentServices();
	} else if (id == 'land') {
		cyLand();
	} else if (id == 'leis') {
		cyLeisureServices();
	} else if (id == 'comm') {
		cyCommunityDevelopment();
	} else if (id == 'plan') {
		cyPlanningDevelopment();
	} else if (id == 'cytr') {
		cyTraining();
	} else { 
		//Not in Community Services, do nothing at this time
		//document.write('Out of Scope');
	}
	document.write('</table>');											
	
	
}

/* cyImgLink:  Display an individial image link
 * 		altTag:  Disciption of the image
 *   		imgURL:  URL of the image to use
 *   		linkURL:  URL of the link
 *		openNewWindow:  true if the link opens in a new window, otherwise false
 */
function cyImgLink(altTag, imgURL, linkURL, openNewWindow) {
	imgURL = "/DEPARTMENTS/Community%20Services/PublishingImages/ImageLinks/"+ imgURL
	var newWin = 'target="_blank"';
	if (!openNewWindow) {
		newWin = '';
	}
	document.write('<tr><td>');
	document.write('<a style="color:#336633;" href="' + linkURL + '" ' + newWin + '>');
	document.write('<img style="border-color:#336633;" src="' + imgURL + ' " alt="' + altTag + '" >');
	document.write('</a></td></tr>');
	
}


