//Set alternate row colors in tables----------------------------------
function alternateRowColors() {
	var className1 = 'listing';
	var className2 = 'mTAB';
	var rowcolor1 = '';
	var rowcolor2 = '';
	var rows, arow;
	var tables = document.getElementsByTagName("table");
	var rowCount = 0;
	for(var i=0;i<tables.length;i++) {
		if(tables.item(i).className == className1 || tables.item(i).className == className2) {
			atable = tables.item(i);
			rows = atable.getElementsByTagName("tr");
			for(var j=0;j<rows.length;j++) {

				noclass= false;
				arow = rows.item(j);
				//make sure no other classes are applied--------------
				if (arow.className=="" || arow.className=="em"){
					noclass=true;
				}

				if(arow.nodeName == "TR" && (noclass==true)) {
					if(rowCount % 2) {
						arow.style.backgroundColor = rowcolor1;
					} else {
						arow.style.backgroundColor = rowcolor2;
					}
					rowCount++;
				}
			}
			rowCount = 0;
		}
	}
}


function toggle(obj){
	var element = document.getElementById(obj);
	var state = element.className;
	alert(state);
	//var headRowName = obj + "-head";
	//var headRowObj = document.getElementById(headRowName);
	
	if (state.indexOf("show")!=-1||state=="feature-desc"){
		element.className = "feature-desc hide";
		//document.getElementById(obj+'-row').className = "hide";
		//headRowObj.className = "feature";
	}
	else if (state.indexOf("hide")!=-1){
		element.className = "feature-desc show";
		//headRowObj.className = "feature-head";
		//document.getElementById(obj+'-row').className = "show";
	
	}
}


//Preload images
var img1 = new Image();
var img2 = new Image();
var img3 = new Image();
var img4 = new Image();
var img5 = new Image();

img1.src="images/bg4.gif";
img2.src="images/date_bg.jpg";
img3.src="images/star_bg.jpg";
img4.src="images/check2.gif";
img5.src="images/star_bg.jpg";
