//  pass the url  and  optionally a width, height, and window name
function spawnWindow(url,name,w,h){
	if(w == undefined) w = 320;
	if(h == undefined) h = 240;
	if(name == undefined) name = "popWindow";
	var newWindow = window.open(url,name,"toolbar=0,scrollbars=1,resizable=1,width="+w+",height="+h+"\"");		
 }
 function spawnJukebox(){
	var newWindow = window.open("content/jukebox.php",'jb',"toolbar=0,scrollbars=1,resizable=1,width=340,height=300");		
 }
 function ifExists(val, htmlOut, other){
	if (typeof other=='undefined') other = "";
	
	if (val.length && val != "false" && val !="/echotools/images/spacer.gif"){
	document.write (htmlOut);
	}else{
		if(other.length)
		{
			document.write (other);
		}
	}
}




function rowHover(id , overClass) 
{
	var b = true;
	if(!overClass)overClass = 'over';
	var table = document.getElementById(id);
	if(!table)return;
    var rows = table.getElementsByTagName("tr");
    for (i=0; i < rows.length; i++) {
		if(rows[i].className != 'infoWrapper'){
			if(b) 
			{
				
				rows[i].bgColor = "#dddddd";
				
			}
			b = !b;
			rows[i].onmouseover = function() { this.className=overClass };
			rows[i].onmouseout = function() { this.className='' };
		}
    }
}




function alternateComments(id) 
{
	var b = false;
	var container = document.getElementById(id);
	if(!container)return;
    var divs = container.getElementsByTagName("div");
    for (i=0; i < divs.length; i++) {
		var div = divs[i];
		
		if(div.className == 'comment'){
			if(b) 
			{
				
				div.className += ' comment_alternate';
				
			}
			b = !b;
			
		}
    }
}








