function NewResource(returnaddress, CLID)
{

	document.myresource.resourcetask.value="additem";
	document.myresource.resourceclassID.value=CLID;
	document.myresource.action = returnaddress;
	document.myresource.submit();
}
/*
	$Vresourcedes = "";
	$Vresourceinfo = "";
	$Vresourceaddress = "";
*/
function dosave(returnaddress)
{
	err = "";
	inerr = false;
	newline = "\n";
	if(document.myresource.resourcedes.value=='')
	{
		err = "Please enter a title";
		inerr = true;
		newline = "\n";
	}

	if (inerr)
	{
		alert(err);
		return;
	}
	document.myresource.resourcetask.value="saveitem";
	document.myresource.action = returnaddress;
	document.myresource.submit();
}
function docommit(returnaddress)
{
	document.myresource.resourcetask.value="storeitem";
	document.myresource.action = returnaddress;
	document.myresource.submit();
}
function doedit(returnaddress,RESID)
{
	document.myresource.resourcetask.value="additem";
	document.myresource.resourceID.value=RESID;
	document.myresource.action = returnaddress;
	document.myresource.submit();
}
function doreset(returnaddress)
{
	document.myresource.resourcetask.value="display";
	document.myresource.action = returnaddress;
	document.myresource.submit();
}

function dodelete(returnaddress,RESID)

{

var agree=confirm("Delete this resource or link?");
if (agree)
   {
  	document.myresource.resourcetask.value="deleteitem";
	document.myresource.action = returnaddress;
	document.myresource.submit();

	  }
else
	{
	return false ;
	}


}




/*functions to  make sure links outs are on the same page that will be on top and smaller*/
window.focus();
/****************************************************
     AUTHOR: WWW.CGISCRIPT.NET, LLC
     URL: http://www.cgiscript.net
     Use the code for FREE but leave this message intact.
     Download your FREE CGI/Perl Scripts today!
     ( http://www.cgiscript.net/scripts.htm )
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes";win=window.open(mypage,myname,settings);
win.focus();}
