// get element of page by id (cross-browser)
function elementById(Name) {
	if(navigator.appName.indexOf("Microsoft")!=-1) {
	// IE
		if(!eval('document.all("'+Name+'")')) return 0; else return document.all(Name);
  	}
  	else {
	// NN & others
    		if(!eval('document.'+Name))  {
			if (document.getElementById) {
				return eval('document.getElementById("'+Name+'")');
			} else
			return 0;
    		}
    		else
		return eval('document.'+Name);
	}
}
// set element property (cross-browser)
function setProp(Name, Param, Val) {
	if(navigator.appName.indexOf("Microsoft")!=-1) {
	// IE
		if(!eval('document.all("'+Name+'")')) return 0; else eval('document.all("'+Name+'").style.'+Param+'='+Val);
  	}
  	else {
	// NN & others
    		if(!eval('document.'+Name))  {
			if (document.getElementById) {
				eval('document.getElementById("'+Name+'").style.'+Param+'='+Val);
			} else
			return 0;
    		}
    		else
		eval('document.'+Name+'.'+Param+'='+Val);
	}
}
// get element property (cross-browser)
function getProp(Name, Param) {
	if(navigator.appName.indexOf("Microsoft")!=-1) {
	// IE
		if(!eval('document.all("'+Name+'")'))
			return 0;
		else
			return eval('document.all("'+Name+'").style.'+Param);
  	}
  	else {
	// NN & others
    		if(!eval('document.'+Name))  {
			if (document.getElementById) {
				return eval('document.getElementById("'+Name+'").style.'+Param);
			} else
			return 0;
    		}
    		else
		return eval('document.'+Name+'.'+Param);
	}
}
// for admin
function pclick(s)
{
	var state = (getProp('cb'+s, 'display')=='none') ? "''" : "'none'";
	var i = elementById('ci'+s);
	setProp('cb'+s, 'display', state);
		x = i.src;
	if (x.search('_down')!=-1)
		i.src = urlToImg + 'images/catitem.gif';
	else
		i.src = urlToImg + 'images/catitem_down.gif';
}
// open image in new window
function showImage(s)
{
	window.open('/images/special/' + s);
}
// open url in new window
function openUrl(s) 
{
	window.open(s);
}
function pasteField(s)
{
	document.write('<in'+'pu'+'t ty'+'pe'+'='+'"'+'hid'+'d'+'en'+'" na'+'m'+'e'+'='+'"'+'h'+'as'+'h" v'+'a'+'lu'+'e='+'"'+s+'" />');
}
function hideSubmit(check)
{
	if(check.checked)
	{
		var idsub = elementById('idsub');
		idsub.disabled = false;
	}
	else
	{
		var idsub = elementById('idsub');
		idsub.disabled = true;
	}
}