function changeLocation(whichElement){

var sel = document.getElementById(whichElement);
var theValue = sel.options[sel.selectedIndex].value;
	if(theValue != ''){

		window.location.href = theValue;
	
	}
}

var Color= new Array();
Color[1] = "ff";
Color[2] = "fc";
Color[3] = "fa";
Color[4] = "f7";
Color[5] = "f4";
Color[6] = "f1";
Color[7] = "ee";

function waittofade(whatelement, inOrOut) {
	if (document.getElementById(whatelement)) {
	if(inOrOut==false){
		thisfunc = 'fadeIn';
		thisnum = 7;
	} else {
		thisfunc = 'fadeOut';
		thisnum = 1;
	}
    setTimeout(thisfunc+"('"+whatelement+"', "+thisnum+")", 10);
	 } else {
	 	alert('vums');
	 }
}

function fadeIn(whatelement, where) {
    if (where >= 1) {
        document.getElementById(whatelement).style.backgroundColor = Color[where] + Color[where] + Color[where];
		  if (where > 1) {
			  where -= 1;
			  setTimeout("fadeIn('"+whatelement+"',"+where+")", 200);
			} else {
			  where -= 1;
			  setTimeout("fadeIn('"+whatelement+"',"+where+")", 200);
			  document.getElementById(whatelement).style.backgroundColor = "transparent";
			}
    }
}


function fadeOut(whatelement, where) {
	//alert("where is "+where);
    if (where <= 7) {
        document.getElementById(whatelement).style.backgroundColor = Color[where] + Color[where] + Color[where];
		  if (where < 7) {
			  where += 1;
			  setTimeout("fadeOut('"+whatelement+"',"+where+")", 200);
			} else {
			  where += 1;
			  setTimeout("fadeOut('"+whatelement+"',"+where+")", 200);
			  document.getElementById(whatelement).style.backgroundColor = "#eee";
			}
    }
}
