
function doAction(strAction)
{
	document.forms[0].action=strAction
	document.forms[0].submit()
}

function doSubmit(strAction)
{
	document.forms[0].SCREEN.value = 1
	document.forms[0].action=strAction
	document.forms[0].submit()
}

function searchSubmit()
{
	document.forms[0].SCREEN.value = 1
	document.forms[0].submit()
}

function doSubmit(strUrl)
{
	document.forms[0].action=strUrl
	document.forms[0].submit()
}

function doCommand(strID,strUrl)
{
	document.forms[0].ID.value=strID
	document.forms[0].action=strUrl
	document.forms[0].submit()
}

function changePage(nextScreen)
{
	document.forms[0].SCREEN.value = nextScreen
	document.forms[0].submit()
}

function openPartner(strUrl)
{
	var newWindow = null
	newWindow = window.open(strUrl,"","width=340,height=400")
}

function openFrame(url, name, width, height)
{
	var newWindow = null
	newWindow = window.open(url,name,"width=" + width+ ",height=" + height + ",scrollbars=yes")
}

function openMap(strUrl)
{
	var newWindow = null
	newWindow = window.open(strUrl,"","status=yes,width=800,height=600")
}

function sortBy(fieldName)
{
	document.forms[0].SORT.value=fieldName
	document.forms[0].SCREEN.value = 1
	document.forms[0].submit()
}

function killParam(crtID,crtPhrase,crtName,crtAction)
{
	if (confirm(crtPhrase + " " + crtName))
	{
		document.forms[0].ID.value = crtID
		document.forms[0].action = crtAction
		document.forms[0].submit()
	}
}

function killRight(crtAccessID,crtPhrase,crtName,crtAction)
{
	if (confirm(crtPhrase + " " + crtName))
	{
		document.forms[0].ACCESS.value = crtAccessID
		document.forms[0].action = crtAction
		document.forms[0].submit()
	}
}

function addParam(crtAction)
{
	document.forms[0].action = crtAction
	document.forms[0].submit()
}

function askCertification(crtID,crtName,crtPhrase)
{
	if (confirm(crtPhrase + " " + crtName))
	{
		document.forms[0].ID.value = crtID
		document.forms[0].submit()
	}
}

function refreshDiv(thisDiv,thisImg)
{
	var x=document.getElementById(thisDiv)
	if (x.style.display == "none")
	{
		x.style.display="block"
		thisImg.src = "../../../images/folder_open.gif"
	}
	else
	{
		x.style.display="none"
		thisImg.src = "../../../images/folder_close.gif"
	}
}

function changeTab(nextTab)
{
	document.forms[0].TAB.value = nextTab
	document.forms[0].submit()
}

function changeRelation()
{
	document.forms[0].ATTRIBUTE_ID.value = ""
	document.forms[0].submit()
}

function changeView()
{
	document.forms[0].RELATION_ID.value = ""
	document.forms[0].submit()
}

function refreshOptions(thisElement)
{
	var x=document.getElementById("divAdvanced")
	if (thisElement.checked == true)
		x.style.display="block"
	else
		x.style.display="none"
}

function refreshListing(thisElement,strAction)
{
	if (thisElement.checked == true)
		thisElement.value="on"
	else
		thisElement.value=""
	document.forms[0].action=strAction
	document.forms[0].submit()
}

function doSearch()
{
	var thisForm=document.forms[0]

	thisForm.SCREEN.value=1
	return true
}

function confirmSend(strMessage,crtAction,msgClick)
{
	if (sendClick == 0)
	{
		if (confirm(strMessage))
		{
			sendClick += 1
			document.forms[0].action = crtAction
			document.forms[0].submit()
		}
	}
	else
		alert(msgClick)
}

function changeNotification(thisCheck,name)
{
	var x = getObj(name);
	
	if (thisCheck.checked == true)
	{
		document.forms[0].NOTIFICATION.disabled = false
		x.visibility = 'visible'
	}
	else
	{
		document.forms[0].NOTIFICATION.disabled = true
		x.visibility = 'hidden'
	}
}

function getObj(name)
{
  if (document.getElementById)
  {
    return document.getElementById(name).style;
  }
  else if (document.all)
  {
    return document.all[name].style;
  }
  else if (document.layers)
  {
    return document.layers[name];
  }
  else return false;
}

