//Custom JavaScript Functions by Shawn Olson
//Copyright 2006-2008
//http://www.shawnolson.net
//If you copy any functions from this page into your scripts, you must provide credit to Shawn Olson & http://www.shawnolson.net
//*******************************************

function changecss(theClass,element,value) {
    //Last Updated on October 10, 1020
    //documentation for this script at
    //http://www.shawnolson.net/a/503/altering-css-class-attributes-with-javascript.html
    var cssRules;
    var added = false;
    for (var S = 0; S < document.styleSheets.length; S++) {
	if (document.styleSheets[S]['rules']) {
	    cssRules = 'rules';
	} else if (document.styleSheets[S]['cssRules']) {
	    cssRules = 'cssRules';
	} else {
	    //no rules found... browser unknown
	}
	for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
	    if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
		if(document.styleSheets[S][cssRules][R].style[element]) {
		    document.styleSheets[S][cssRules][R].style[element] = value;
		    added=true;
		    break;
		}
	    }
	}
	if(!added) {
	    try {
		document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
	    } catch(err) {
		try {
		    document.styleSheets[S].addRule(theClass,element+': '+value+';');
		} catch(err) {
		}
	    }
	}
    }
}

function changeType(cType) {
    if (cType=="full") {
	changecss('.full','background-color','#cccccc');
	changecss('.start','background-color','#ffffff');
    } else {
	changecss('.full','background-color','#ffffff');
	changecss('.start','background-color','#cccccc');
    }
}
