var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}

if (document.getElementById) {
 document.writeln('<style type="text/css"><!--')
 document.writeln('.main {text-decoration:none; font:14px Tahoma, Arial, Geneva, sans-serif; color:#92C128; cursor:hand; cursor:pointer}')
 document.writeln('span:hover.mainLink {text-decoration:underline; color:yellow}')
 document.writeln('.links {display:none; font:14px Tahoma, Arial, Geneva, sans-serif; padding-left:14px}')
 document.writeln('.link {text-decoration:none; font:14px Tahoma, Arial, Geneva, sans-serif; color:white}')
 document.writeln('a:hover.link {text-decoration: underline; color: yellow}')
 document.writeln('//--></style>') }

function openClose(theID) {
 if (document.getElementById(theID).style.display == "block") {
     document.getElementById(theID).style.display = "none";
     document.getElementById("tick_"+theID).innerHTML = "<font color='#92C128'>+</font>"; }
 else {
     document.getElementById(theID).style.display = "block";
     document.getElementById("tick_"+theID).innerHTML = "<font color='#92C128'>-</font>"; } }
	function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
			$.post("rpc_main.php", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup

	function fill(thisValue) {
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
	}