﻿function getParameter(str){
	var dec = decodeURIComponent;
	var par = new Array, itm;
	if(typeof(str) == 'undefined') return par;
	
	if(str.indexOf('?', 0) > -1) str = str.split('?')[1];
	
	str = str.split('&');
	for(var i = 0; str.length > i; i++){
		itm = str[i].split("=");
		if(itm[0] != ''){
			par[itm[0]] = typeof(itm[1]) == 'undefined' ? true : dec(itm[1]);
		}
	}
	return par;
}

function submit(formname) {
	ret=getParameter(location.search);
	location.replace(ret["href"]);

}