	// set focus
		function gp_setFocus(inField) {
			//set focus to inField form field if valid
			//format:: [formName].[fieldName]
			var vField = inField
			if (vField==null || vField==''){vField="search.kw"}
			var aField = vField.split(".")
		
			//alert( document.forms[aField[0]].elements[aField[1]] )
		}
		
	// expand/contract
		function js_expandThis(vThis) {
			//input a text value for div and span tags to change/expand

			var vSpan = vThis
			var vDiv = document.getElementById(vThis.id +'_div');
					
			if (vSpan.innerHTML == '[+]'){
				vSpan.innerHTML = '[-]';
				vDiv.style.visibility = 'visible';
				vDiv.style.display = '';
			}
			else {
				vSpan.innerHTML = '[+]';	
				vDiv.style.visibility = 'hidden';				
				vDiv.style.display = 'none';			
			}
		}		
		
	//general functions
		function trim(inS){
			if (inS != null){inS = inS.replace(/^\s*|\s*$/g,'');}
			return inS;
			}
	
		function ltrim(inS){
		    if (inS != null){inS = inS.replace(/^\s*/g,'');}
			return inS;
			}
	
		function rtrim(str){
		    if (inS != null){inS = inS.replace(/\s*$/g,'');}
			return inS;
			}
			
		function closeDiv(inId){
			vDiv = document.getElementById(inId)
			if (vDiv!=null){
				vDiv.style.display	= 'none';
			}
		}					
					
		function inputFocus(inThis){
			//onfocus clear or if not default then select all
			if (inThis.value == inThis.defaultValue){
				inThis.value = "";
				inThis.style.color = "#000000";
			}
			inThis.select();
		}
		
		function inputBlur(inThis){
			//on blur change back to default if not changed
			if (inThis.value == ""){
				inThis.value = inThis.defaultValue;
				inThis.style.color = "#C0C0C0";
			}
			else {
				inThis.style.color = "#000000";
			}
		}
	
		function getThisY(inThis){
			//use for objects not events
			var returnValue = inThis.offsetTop;
			while((inThis = inThis.offsetParent) != null){
				returnValue += inThis.offsetTop;
			}
			return returnValue;
		}

		function getThisX(inThis){
			//use for objects not events
			var returnValue = inThis.offsetLeft;
			while((inThis = inThis.offsetParent) != null){
				returnValue += inThis.offsetLeft;
			}
			return returnValue;
		}
		
		function setCookie(c_name,value,expiredays){
			var exdate = new Date();
			exdate.setDate(exdate.getDate()+expiredays);
			document.cookie = c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
		}

		function getCookie(c_name){
			if (document.cookie.length>0){
				c_start=document.cookie.indexOf(c_name + "=")
				  if (c_start!=-1){ 
					    c_start=c_start + c_name.length+1 
					    c_end=document.cookie.indexOf(";",c_start)
					    if (c_end==-1) c_end=document.cookie.length
					    return unescape(document.cookie.substring(c_start,c_end))
				    } 
			}
			return ""
		}
	
		function queryString(inGet) {
			var vGet = trim(inGet);
			if (vGet!=''){
				var qs = window.location.search.substring(1);
				var aQs = qs.split("&");
				var vReturn='';
				for (i=0;i<aQs.length;i++) {
					vQs = aQs[i].split("=");
					if (vQs[0]==vGet){vReturn = vQs[1]; break;}
				}
			}
			return vReturn;
		}	
			