startList = function() {
	if (document.all&&document.getElementById) {
		topnaviRoot = document.getElementById("topnavi");
		for (i=0; i<topnaviRoot.childNodes.length; i++) {
			node = topnaviRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;



function showimage(dropdown,image)
{
document.getElementById(''+image+'').src= document.getElementById(''+dropdown+'').value
}

function textCounter(field,maxlimit) {

document.getElementById(''+field+'').value = document.getElementById(''+field+'').value.substring(0, maxlimit);

}

function confirmSubmit()
{
var agree=confirm("Are you sure you want to delete?");
if (agree)
	{document.form1.dowhat.value='delete';  
	document.form1.submit();}
else
	return false ;
}


function Submit()
{
	
var numberChecked = 0;
for (var i=0; i<document.form1.cid.length; i++) {
	if(document.form1.cid[i].checked) {
		numberChecked++;
		}
	}
	
if (numberChecked <=1)
	{
	document.form1.dowhat.value='edit';  
	document.form1.submit();
	}
else
	alert('Please select only one page to edit')
	return false;
}


function showthis(what)
{
	
if (document.getElementById(''+what+'').style.display=="none")
{

		document.getElementById(''+what+'').style.display ="" 
		}
		else
		{ 
		document.getElementById(''+what+'').style.display ="none" 
}

}