sforms=document.getElementsByTagName('form');
sforms[0].onsubmit=function(){
	var action='';
	var query='';
	var slist=document.getElementById('slist');
	var v=slist.options[slist.selectedIndex].value;
	switch(v){
	case 'f': //http://www.3dm3.com/forum/search.php?do=process
		action='http://www.3dm3.com/forum/search.php?do=process';
		query='query';
	break;
	case '3': //http://www.3dm3.com/modelsbank/
	break;
	case 'a': //http://www.3dm3.com/forum/articles.php
		this.method='post';
		var div = document.createElement('div');this.appendChild(div);
		div.innerHTML='<input type="hidden" name="action" value="dosearcharticle">'+
'<input type="hidden" name="searchby" value="searchall">'+
'<input type="hidden" name="submit" value="s">';
		action='http://www.3dm3.com/forum/articles.php';
		query='keywords';
	break;
	case 'p': //http://www.3dm3.com/portfolio/
		this.method='post';
		var div = document.createElement('div');this.appendChild(div);
		div.innerHTML='<input type="hidden" name="do" value="searchresults">'+
'<input type="hidden" name="fields[]" value="title">'+
'<input type="hidden" name="fields[]" value="keywords">'+
'<input type="hidden" name="fields[]" value="description">'+
'<input type="hidden" name="catids[]" value="0">';
		action='http://www.3dm3.com/portfolio/search.php';
		query='string';
	break;
	case 'b': //http://www.3dm3.com/forum/blogs/
	break;
	case 'v': //http://www.3dm3.com/video/
		action='http://www.3dm3.com/video/';
		query='s';
	break;
	case 'u': //http://www.3dm3.com/forum/memberlist.html
	break;
	case 'g': //http://www.3dm3.com/forum/groups/
	break;
	case '':
	default:
	}
	if(action!=''){
		this.action=action;
		var input = document.createElement('input');this.appendChild(input);
		input.type='hidden';input.name=query;input.value=document.getElementById('qinput').value;
	}
	//return false;
}
