/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/various/more.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */

clickMenu = function(menu,element,cname) {
	var getEls = document.getElementById(menu).getElementsByTagName(element);

	for (var i=0; i<getEls.length; i++) {
			getEls[i].onclick=function() {
			if ((this.className.indexOf(cname))!=-1)
			{
			if ((this.className.indexOf('click'))!=-1) {
				this.className=this.className.replace("click", "");;
				}
				else {
				this.className+=" click";
				}
			}
		}
	}
}

var tini = 800;
var mini = 1024;
var big = 1280;
var med = 1152;
var large = 1680;

if (window.screen.availWidth == tini) {
			document.write('<link rel="stylesheet" type="text/css" href="t800.css" />');
			}

	else if (window.screen.availWidth == mini){
			document.write('<link rel="stylesheet" type="text/css" href="t1024.css" />');
			}

	else if (window.screen.availWidth == big){
			document.write('<link rel="stylesheet" type="text/css" href="t1280.css" />');
			}

	else if (window.screen.availWidth == med){
			document.write('<link rel="stylesheet" type="text/css" href="t1152.css" />');
			}

	else if (window.screen.availWidth == large){
			document.write('<link rel="stylesheet" type="text/css" href="t1680.css" />');
			}

	else		{
			document.write('<link rel="stylesheet" type="text/css" href="t1280.css" />');
			}



