	function SH(ElementID)
	{
		SHHelp = document.all[ElementID].style.visibility;
		if (SHHelp=='hidden')
			{document.all[ElementID].style.display='block';
			document.all[ElementID].style.visibility='visible';}
		else
			{document.all[ElementID].style.display='none';
			document.all[ElementID].style.visibility='hidden';}
		}
	
	function showhelp(strHELP) {
//		window.status=strHELP;
		var rightedge = document.body.clientWidth-event.clientX;
		var bottomedge = document.body.clientHeight-event.clientY;
		ie5menu.innerHTML=strHELP;
		if (rightedge < ie5menu.offsetWidth)
			ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth + 15;
		else
			ie5menu.style.left = document.body.scrollLeft + event.clientX + 15;
		if (bottomedge < ie5menu.offsetHeight)
			ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight + 15 ;
		else
			ie5menu.style.top = document.body.scrollTop + event.clientY + 15;
			ie5menu.style.visibility = "visible";
		return false;
		}
	function hidehelp()
	{	
//		window.status='WebON Content management';
		ie5menu.innerHTML='';
		ie5menu.style.visibility = "hidden";
	}
	

function textCounter( field, countfield, maxlimit ) {
  if ( field.value.length > maxlimit )
  {
    field.value = field.value.substring( 0, maxlimit );
    alert( 'Textarea value can only be ' + maxlimit + ' characters in length.' );
    return false;
  }
  else
  {
    countfield.value = maxlimit - field.value.length;
  }
}


function ADMINWINDOW2(strHREF, strWidth, strHeight) {
OpenWin = window.open(strHREF, "", "toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes,width='+strWidth+',height='+strHeight+'");
   					var aw = screen.availWidth;
				    var ah = screen.availHeight;
					if (strWidth>aw) strWidth=aw;
					if (strHeight>ah) strHeight=ah;
				 	OpenWin.resizeTo(strWidth,strHeight);
				 	OpenWin.moveTo(screen.width/2-strWidth/2,screen.height/2-strHeight/2);
					OpenWin.focus()
}



function copyToClipboard(sText)
{
	  var sText1 = window.clipboardData.getData('Text');
      var bSuccess = window.clipboardData.setData('Text', sText1 + '\n' + sText);
      if (bSuccess) alert('text copied to clipboard');
      else alert('copy to clipboard failed');
}
function getFromClipboard()
{
      var sText = window.clipboardData.getData('Text');
      return(sText);
}


function ADMINWINDOW(strHREF, strWidth, strHeight) {
location.href=strHREF;
}


/*
var seconds=20*60;
function countDown() {
	if(seconds<=0) {
		document.location.href="/default.asp?doAction=INACTIVE";
	}
//	if(seconds==60) {alert('Your session will expire in 60 seconds!!!\nSubmit your work now.')}
seconds--;
if (WCOUNTER) {WCOUNTER.innerHTML=seconds;}
window.setTimeout("countDown()",1000);	
}
function resetCounter() {
	seconds=300;
}

window.setTimeout("countDown()",1000);
*/
