/******************************************************************
 * PHPMass Real Estate
 * The contents of this file are subject to the PHPMass License. 
 * If you do not agree with PHPMass License Terms and Conditions 
 * than you should not use this software.
 * A copy of the license file is available on www.phpmass.com/license.htm page.
 * 
 * PHPMass.com.
 * All Rights Reserved.
 ******************************************************************/
function makeFilters(){
  var filterObj=document.getElementById('filtermenu').getElementsByTagName("ul")
    for (var t=0; t<filterObj.length; t++){
    		filterObj[t].parentNode.onmouseover=function(){
    		this.getElementsByTagName("ul")[0].style.visibility="visible"
    	}
    	filterObj[t].parentNode.onmouseout=function(){
			this.getElementsByTagName("ul")[0].style.visibility="hidden"
    	}
    }
}
function makeLocations(){
  var filterObj=document.getElementById('locationsmenu').getElementsByTagName("ul")
    for (var t=0; t<filterObj.length; t++){
    		filterObj[t].parentNode.onmouseover=function(){
    		this.getElementsByTagName("ul")[0].style.visibility="visible"
    	}
    	filterObj[t].parentNode.onmouseout=function(){
			this.getElementsByTagName("ul")[0].style.visibility="hidden"
    	}
    }
}


// This function makes tabs on the product administration page. a_ (div id) is the tab id of the respective table id
function activateprodtabs(divid)
{
		var divArray = ['primaryinfo', 'otherinfos', 'prodrelateditems'];
		for (var index = 0; index < divArray.length; ++index) {
			var buttonName = 'a_'+divArray[index];
			if(divid == divArray[index]){
				if($(divArray[index])){
					$(divArray[index]).show();
					if ($(buttonName)) $(buttonName).addClassName('selected');
				}
			}
			else{
				if($(divArray[index])){
					$(divArray[index]).hide();
					if ($(buttonName)) $(buttonName).removeClassName('selected');
				}
			}
		}
}
