var DHTML = (document.getElementById || document.all || document.layers);

function invi(id, flag) {
	if (!DHTML) return;
	var obj = getObj(id, false);
	obj.style.visibility = (flag) ? 'hidden' : 'visible'
}

function addFav(name,url) {
	if (window.sidebar) { window.sidebar.addPanel(name, url,""); }
	else if (document.all) { window.external.AddFavorite(url, name); }
}

function stfocus(frmI,cntrlI) {
	document.forms[frmI].cntrlI.focus();
}

function isntAvailableCookies() {
	return navigator.cookieEnabled == 0;
}

function showImg(strURI, img) {
	var imgdsp = window.open(strURI + "dnmc/img.php?" + img,"Preview","resizable=1,height=200,width=200");
	//bla.document.close();
}

function getGoogle(txt) {
	return false;
}

function getObj(name, hasParent) {
	var myDoc = document;
	if (hasParent != null && hasParent) myDoc = parent.document;
	if (document.getElementById)
		if (myDoc.getElementById(name)) return myDoc.getElementById(name);
	else if (document.all)
		if (myDoc.all[name]) return myDoc.all[name];
	else if (document.layers)
		if (myDoc.layers[name]) return myDoc.layers[name];
	return null;
}

function getStyle(name, hasParent) {
	var myDoc = document;
	if (hasParent != null && hasParent) myDoc = window.parent.document;
	if (document.getElementById)
		if (myDoc.getElementById(name)) return myDoc.getElementById(name).style;
	else if (document.all)
		if (myDoc.all[name]) return myDoc.all[name].style;
	else if (document.layers)
		if (myDoc.layers[name]) return myDoc.layers[name];
	return null;
}
