function loadManager() { 
	var lngJumpTo = id; 
	var url='/manager.dws?id='+lngJumpTo ;
	var name='Smartsite5Manager';
	var w=screen.width-200;
	var h=screen.height-300;
	openWindowRight(url,name,w,h);
}


function openWindowRight(url,name,w,h,opts) {
	var x = 100;
	var y = 100;
	if (opts==null){opts='toolbar=no,location=no,resizable=yes,status=yes,scrollbars=yes,menubar=no';}
	if (parseInt(navigator.appVersion)>=4){
		return window.open(url,name,opts + ',left='+x+',top='+y+',width='+w+',height='+h)
	} 
	else{ 
		return window.open(url,name,opts + ',width=640,height=480')
	}
}


function resetform() { 
	$j(".inputselect").each(function (i) {
		if (this.value!=-1) {
			this.value=-1;
			}
		});
		
	$j("#results").html("");	
}

function checkform() { 
	var bselected = false;
	$j(".inputselect").each(function (i) {
		if (this.value!=-1) {
			bselected = true;
			}
		});
		
	return bselected;	
}



function buildq() {
	var q = "";
	var elcount = 0;

	$j(".inputselect").each(function (i) {
		if (this.value!=-1) {
			q += "&" + this.id + "=" + this.value;
			elcount++;
		}
	});
	
	return "&filters=" + elcount + q;
}


function runfindpubs() {

if (checkform()==true) {
	 var html = $j.ajax({
	  url: "/?id=AJAXRESULTS" + buildq(),
	  async: false
	 }).responseText;
	
	 $j("#results").html(html);
 
 }

}
   