//////////////////////////////////////////////////////////////////////////////
//edit box onstate script
//
//
//Desc: This section of code is used by the edit box to manage onstates.
//////////////////////////////////////////////////////////////////////////////
var currently_on = null;
function turnOn(obj){
	
	if(currently_on==null){
		currently_on = document.getElementById('first');
	}//end if
	
	//turn off the current item and turn on the clicked
	currently_on.style.textDecoration='underline';
	obj.style.textDecoration='none';
	
	currently_on=obj;
}//end function
//////////////////////////////////////////////////////////////////////////////
//edit
//
//
//Desc: does something 
//////////////////////////////////////////////////////////////////////////////
function edit(id, admin){
	if(admin && admin==1){	
		html = "<iframe name='targetFrame' id='targetFrame' src='"+prepend+"infotab-summary.php?Point_ID="+id+"' style='width:585px;height:535px;overflow-y:auto;' marginwidth='0' marginheight='0' frameborder='0'></iframe>";	
		TA_showBox('editorFrame', 600, html, '', 0, 150);
		}else{
		TA_showBox('editorFrame', 600, 'Point_ID='+id, "editor.php", 0, 150);
		}
	}
//////////////////////////////////////////////////////////////////////////////
//getEl
//
//Desc: A faster and easier to type document.getElementById()
//////////////////////////////////////////////////////////////////////////////
function getEl(el){
	return document.getElementById(el);
}//end function
//////////////////////////////////////////////////////////////////////////////
//showEl
//
//Desc: Sets target display to block
//////////////////////////////////////////////////////////////////////////////
function showEl(target){
	var obj = getEl(target);
	if(obj==null){
		alert(target+" = "+obj);
		return false;
	}else{
		obj.style.display="block";
		return true;
	}//end else
}//end function
//////////////////////////////////////////////////////////////////////////////
//hideEl
//
//Desc: Sets target display to none
//////////////////////////////////////////////////////////////////////////////
function hideEl(target){
	var obj = getEl(target);
	if(obj==null){
		alert(target+" = "+obj);
		return false;
	}else{
		obj.style.display="none";
		return true;
	}//end else
}//end function
//////////////////////////////////////////////////////////////////////////////
//updateDiv
//
//Desc: Calls a special version of updateContentArea just for use with
//run.php
//////////////////////////////////////////////////////////////////////////////
function updateDiv(divName,funct_name,param1,param2,param3,param4){
	
	var vars = "function_name="+funct_name+"&param1="+param1+"&param2="+param2+"&param3="+param3+"&param4="+param4;	
	updateContentArea(divName,vars,'run.php');
	
}//end function


function changePhoto(Photo, Point_ID){
	top.TA_showBox('editorFrame', '500', "photo="+Photo+"&Point_ID="+Point_ID, "largephoto.php", 0, '150')
}
