﻿// JavaScript functions for bride.ca | Directory.cfm 

function RegionNavShow() {
	var chldrn = document.getElementById("RegionNavigation");
	chldrn.style.height = "auto";
	chldrn.style.overflow = "auto";
	document['RegWinIcon'].src = '/Images/Icons/Skin4/windowcontract.gif';
	document['RegWinIcon'].alt = 'Close Region Menu';
}	
function RegionNavHide() {
	var chldrn = document.getElementById("RegionNavigation");
	chldrn.style.height = "16px";
	chldrn.style.overflow = "hidden";
	document['RegWinIcon'].src = '/Images/Icons/Skin4/windowexpand.gif';
	document['RegWinIcon'].alt = 'Open Region Menu';
}
function RegionNavToggle() {
	var chldrn = document.getElementById("RegionNavigation");
	if (chldrn.style.height == 'auto') RegionNavHide();
	else RegionNavShow();
}	
function CategoriesShow() {
	var cat = document.getElementById("CategoryList");			
	cat.style.height = "auto";
	cat.style.overflow = "auto";
	document['CatWinIcon'].src = '/Images/Icons/Skin4/windowcontract.gif';
	document['CatWinIcon'].alt = 'Click for less..';
	document.getElementById("CatOptText").innerHTML = 'show less ..';
}	
function CategoriesHide() {
	var cat = document.getElementById("CategoryList");
	cat.style.height = "200px";
	cat.style.overflow = "hidden";
	document['CatWinIcon'].src = '/Images/Icons/Skin4/windowexpand.gif';
	document['CatWinIcon'].alt = 'Click for ALL Categories..';
	document.getElementById("CatOptText").innerHTML = 'show all categories ..';
}
function CategoriesToggle() {
	var cat = document.getElementById("CategoryList");
	if (cat.style.height == 'auto') CategoriesHide();
	else CategoriesShow();
}
function ListingOn(l) {
	var lstng = document.getElementById("Listing" + l);
	lstng.style.backgroundColor = "FFFFF9";
}	
function ListingOff(l) {
	var lstng = document.getElementById("Listing" + l);
	lstng.style.backgroundColor = "FFF";
}