// template.js

// Ron Patterson, BPWC

// handler to set the header banner for the specified school

function set_banner (school) {
	if (!school.blank()) {
		$('banner').style.backgroundImage = 'url(http://schools.wps60.org/school_images/'+school+'Banner.jpg)';
	}
}

function pic_window (pic_link,width,height) {
	//alert(link);
	w = window.open('http://schools.wps60.org/school_jscripts/showpic.html?name='+escape(pic_link), 'Picture_page', 'width='+width+',height='+height+',resizable,scrollbars,location=no,menubar=no,status=no');
	return false;
}

// event handler for the banner clicks

document.observe("dom:loaded", function () {
	Event.observe($('banner'), 'click', function (event) {
		//alert(event.x);
		//alert(event.clientX);
		if (event.clientX > 75)
			var link = 'index.php';
		else
			var link = 'http://www.wps60.org';
		if (event) event.stop;
		location.href = link;
	});
}); 

