	function getParams(myForm){		
		var x = 0;
		var params = "";
		var add;
		for(x=0; x<myForm.elements.length; x++) {
			el = myForm.elements[x];
			if(el.type=='hidden' || el.type=='text' || el.type=='checkbox' || el.type=='textarea'  || el.type=='radio' || el.type=='select-one'){
				add = true;
				if (el.type=='radio' || el.type=='checkbox'){
					if (el.checked)	{
						add = true;
					}else{
						add = false;
					}
				}
				if (add){
					params = params + el.name + '=' + encodePar(el.value) + '&';					
				}
			}
		}
		if (params!=""){
			params = params.substring(0, params.length-1);
		}
		return(params);
	}	
	
	
	function encodePar(str){		
		var strRet = str;
		
		if ((str == "") || (str==null)){
			strRet = str;
		}else{
			strRet = strRet.replace(/\+/g, "%2B");							
		}

		return strRet;
	}

	
	function queryString(key){
		var page = new PageQuery(window.location.search);
		return unescape(page.getValue(key));
	}


	function getRegenCache4JS(){	
		var myRegenCache = queryString('regencache');
		if (myRegenCache == 1){
			return '&regencache=1';
		}else{
			return '';
		}		
	}


	function PageQuery(q) {
		if(q.length > 1) this.q = q.substring(1, q.length);
		else this.q = null;
		this.keyValuePairs = new Array();
		if(q) {
			for(var i=0; i < this.q.split("&").length; i++) {
				this.keyValuePairs[i] = this.q.split("&")[i];
			}
		}
	
		this.getKeyValuePairs = function() { return this.keyValuePairs; }
		this.getValue = function(s) {
										for(var j=0; j < this.keyValuePairs.length; j++) {
											if(this.keyValuePairs[j].split("=")[0] == s)
											return this.keyValuePairs[j].split("=")[1];
										}
										return false;
									}
	
		this.getParameters = function() {
											var a = new Array(this.getLength());
											for(var j=0; j < this.keyValuePairs.length; j++) {
												a[j] = this.keyValuePairs[j].split("=")[0];
											}
											return a;
										}
		this.getLength = function() { return this.keyValuePairs.length; }
	}





	//HEIGHT WINDOW
	function tellMeTheHeight() {
	        w = window;
	        var height = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
	        return height;
	}
	
	//WIDTH WINDOW
	function tellMeTheWidth() {
	        w = window;
	        var width = w.innerWidth || (w.document.documentElement.clientWidth || w.document.body.clientWidth);
	        return width
	}

