var ie=(document.all && document.all.item && !window.opera)?1:0;

function adv(){
document.write("<STYLE TYPE='text/css'>.adv, h1 {visibility: hidden; display: none; color:FFFFFF; font-size:10px; font-style: normal; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px;}</STYLE>");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function ShowHideDirs(id) {
	if(!ie) return true;
	if(!document.all["dir"+id]) return true;

	dir = document.all["dir"+id];
	if (dir.className == 'BlShow') {
		dir.className = 'BlHide';
	} else {
		dir.className = 'BlShow';
	}
	return false;
}

function HideAllDirs() {
	var i,id, args = HideAllDirs.arguments;
	if(!ie) return true;
	for(i=0; i<args.length; i++)
	{
		id = args[i];
		if(document.all["dir"+id])
		{
			dir = document.all["dir"+id];
			dir.className = 'BlHide';
		}
	}
	return true;
}

function openImage(image) {
	window.open("/popup.php?img="+image, "popupimage", "scrollbars=0, resizable=1, width=520, height=450").focus();
}

function ShowHCombo(id) {
	if(!ie) return true;
	
	if(!document.all["comb"+id]) return true;
    
	comb = document.all["comb"+id];
	if (comb.className == 'BlShow') {
		comb.className = 'BlHide';
	} else {
		comb.className = 'BlShow';
	}
	return false;
}

function SetHiddenVar(variable,val) {
	var forma = document.forms['Search'];
	forma.elements[variable].value = val;
	forma.submit();
	return false;
}
