function hideAllDates(){
	for(i=1;i<=31;i++){
		//alert("events_"+i)
		hide("events_"+i)
	}
}

function hide(strObj) 
{
	var v,obj
	if(document.getElementById){
		obj=tmt_findObj(strObj);
	 	if(obj){
					obj.style.display='none'
					obj.style.visibility='hidden'
				}
	
	}else{
		if ((obj=MM_findObj(strObj))!=null){ 
    		if (obj.style) 
				{obj=obj.style;}
    		v='hide'
				obj.visibility=v; 
		} 
	} 
}
function show(strObj) 
{
	var v,obj
	if(document.getElementById){
		obj=tmt_findObj(strObj);
	 	if(obj)
				{
					obj.style.display=''
					obj.style.visibility='visible'
				}
	
	}else{
		if ((obj=MM_findObj(strObj))!=null){ 
    		if (obj.style) 
				{obj=obj.style;}
    		v='show'
				obj.visibility=v; 
		} 
	} 
}
function toggleVisibility(strObj) 
{
	var v,obj
	
	if(document.getElementById){
		obj=tmt_findObj(strObj);
	 	if(obj){
			
			if(obj.style.display==''){
					obj.style.display='none'
					obj.style.visibility='hidden'
				}
			else
				{
					obj.style.display=''
					obj.style.visibility='visible'
				}
		}
	}else{
		if ((obj=MM_findObj(strObj))!=null){ 
    		if (obj.style) 
				{obj=obj.style;}
    		/* sgross toggle */
				if(obj.visibility=='show')
					{v='hide'} 
				else 
					{v='show'}
    	
				obj.visibility=v; 
		} 
	} 
} 







//function IsObject(strObj) {
//	try { eval(strObj); } 
//	catch (varException)
//	{
//			return (false);
//	} 
//	return (true);
//}

// populates form elements default values
function defaultValue(frmElement,val)
{
	if(frmElement)
	{
		// alert(frmElement.type)
		if(frmElement.type=="text"||frmElement.type=="hidden"){
			frmElement.value = val;
		}else{
			for(i=0;i<frmElement.length;i++)
			{
				optionValue = String(frmElement[i].value)
				optionValue = optionValue.toLowerCase()
			
				targetValue = String(val)
				targetValue = targetValue.toLowerCase()
				
				if (optionValue == targetValue){
					
					
					if(frmElement.type=="select-one"){
						frmElement.selectedIndex = i;
					}else if (frmElement.type=="select-multiple"){
						frmElement[i].selected = true;
					}else if (frmElement[i].type=="radio"){
						frmElement[i].checked = true;
					}else if (frmElement[i].type=="checkbox"){
					frmElement[i].checked = true;	
					}
				}
			}
		
		}
	} else {
	alert('form element not found')
	}
}

function showItem(loc,w,h){
	newWin = window.open(loc,"winZoom","width="+ w +",height="+ h +"");
	newWin.focus();
}




function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}