// JavaScript Document

function imgCh(id,o,tmp){
	if(o=="ov"){
		document.getElementById(id).src = "http://jamfor.us/" + tmp + "/img/" + id.substr(1) + "_o.png" ;
	}else{
		document.getElementById(id).src = "http://jamfor.us/" + tmp + "/img/" + id.substr(1) + ".png" ;
	}
}

function preloadImages() { 

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

function pgCh(id){
	o = "ov";
	if(id=="home"){
		o = "o";
	}
	imgCh("ilogo",o);
	imgCh("itent1",o);
	imgCh("imembers",o);
}

function googAn(file){
	
	var pageTracker = _gat._getTracker("UA-3515750-1");
	pageTracker._initData();
	

}

function tblur(id){
	if(id.value!=''){
		return id.value;
	}else{
		return id.id;
	}
}

function tfocus(id){
	if(id.value==id.id){
		return '';
	}else{
		return id.value;
	}
}

function chdate(el){
	var ndate = el.selectedIndex;
	var id = el.id;
	var subid = id.substring(1);
	
	if(id.substring(0,1)=="e"){
		return;
	}
	
	document.getElementById('n'+subid).selectedIndex = ndate;
	
	if(subid=='hour' && ndate <= 11){
		ndate=ndate+4;
		document.getElementById('eday').selectedIndex = document.getElementById('nday').selectedIndex;
		document.getElementById('eapm').selectedIndex = document.getElementById('napm').selectedIndex;
	}
	
	if(subid=='hour' && ndate > 11){
		ndate=ndate-12;
		document.getElementById('eday').selectedIndex = document.getElementById('nday').selectedIndex+1;
		document.getElementById('eapm').selectedIndex = document.getElementById('napm').selectedIndex+1;
	}
	
	document.getElementById('e'+subid).selectedIndex = ndate;
	
}