function submit_form(obj){
document.forms[obj].submit();
//document.getElementById(obj).submit();
}

function url_remake(url,parametr,znachenie)	{
var expr = new RegExp(''+parametr+'=\\w*');
if (url.search(expr) != -1) {
if (znachenie!=0 && znachenie!="" && znachenie!='default') var newstr = url.replace(expr, parametr+"="+znachenie);
else { var newstr = url.replace(expr, ""); }	
}
else {
	var expr = new RegExp('\\?');
	if (url.search(expr) != -1)   var newstr=url+'&'+parametr+"="+znachenie; 
		else var newstr=url+'?'+parametr+"="+znachenie; 
	}
return (newstr);
}

function conformated_action(url,text){
name = confirm(text,'');
if (name!=false && name!=null && name!="false") window.location.href=url;
}

function close_all_frames_noreload(){
$.fn.fancybox.close();
}

function click(e) {
	if (document.all && window.event.button == 2) {
		alert (message);
		return false;
	}

	if (document.getElementById && !document.all) {
		if (e.which == 2 || e.which == 3) {
			alert (message);
			return false;
		}
	}
}
//document.onmouseup=click;
//document.oncontextmenu=new Function("return false")

////////////////////////////


function disableSelection(target){
if (typeof target.onselectstart!="undefined") //For IE 
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //For Firefox
	target.style.MozUserSelect="none"
else //All other route (For Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}



