function switchclass(nuClass,prID) {
			if ( document.getElementById(prID).className==nuClass ) {
			document.getElementById(prID).className=document.getElementById(prID).className.replace(new RegExp(nuClass+"\\b"), "");
			}
			else {
			document.getElementById(prID).className+=nuClass;
			}
}

function showhide(prID) {
			if ( document.getElementById(prID).className=="hidden" ) {
			document.getElementById(prID).className="visible";
			}
			else {
			document.getElementById(prID).className="hidden";
			}
}

function propchoose(prID) {
			var proptoadd = "&" + prID.replace(new RegExp("srchprop_"), "") ;
			if ( document.getElementById(prID).className=="chosen" ) {
			document.getElementById(prID).className=document.getElementById(prID).className.replace(new RegExp("chosen\\b"), "");
			document.getElementById('category').value=document.getElementById('category').value.replace(new RegExp(proptoadd), "");
			}
			else {
			document.getElementById(prID).className+="chosen";
			document.getElementById('category').value+=proptoadd;
			}
}

function propselect () {
	var propoptions = document.getElementById("custom_search").getElementsByTagName("select");
	for (var i=0; i<propoptions.length; i++) {
		if (propoptions[i].value)
		{
			addtoquery = "&" + propoptions[i].value;
			document.getElementById('category').value += addtoquery;
		}
	}
}

function getsize(dim) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  if (dim == "h") { return myHeight; }
  if (dim == "w") { return myWidth; }  
}
