function GID(obj){return document.getElementById(obj);}
function setCookie (name, value, expires, path, domain, secure) {        document.cookie = name + "=" + escape(value) +        ((expires) ? "; expires=" + expires : "") +        ((path) ? "; path=" + path : "") +        ((domain) ? "; domain=" + domain : "") +        ((secure) ? "; secure" : "");}
function getCookie(name) {	 var cookie = " " + document.cookie;	 var search = " " + name + "=";	 var setStr = null;	 var offset = 0;	 var end = 0;	 if (cookie.length > 0) {offset = cookie.indexOf(search);if (offset != -1) {offset += search.length;end = cookie.indexOf(";", offset);if (end == -1) {end = cookie.length;}setStr = unescape(cookie.substring(offset, end));}}return(setStr);}
function replace_string(txt,cut_str,paste_str){var f=0;var ht='';ht = ht + txt;f=ht.indexOf(cut_str); while (f!=-1){f=ht.indexOf(cut_str);if (f>0){ht = ht.substr(0,f) + paste_str + ht.substr(f+cut_str.length);};};return ht};
function loc(url){window.location.href = url;}
function winop(url){windop = window.open(url,"mywin","height=500,width=1000,left=100,top=30,scrollbars=yes");}
function wincl(url){windop.close();}
function ShowAlert(mess){var my_alert = $('<div title="Сообщение">'+mess+'</div>');my_alert.appendTo('body').dialog({bgiframe: true,height: 140,modal: true});}
function ShowMessQ(mess){return ShowAlert(mess);}
function save(){var m = $('<div style="position:fixed; z-index:9999; top:'+($(window).height()/2-50)+'px; left:'+($(window).width()/2-50)+'px; background:#f26522; color:#FFFFFF; width:100px; text-align:center; padding:10px; border:solid 1px #CCCCCC;">готово</div>');m.appendTo("body");$(m).css('opacity','0.5');$(m).animate({opacity: "0.8"},'slow',function(){$(m).animate({opacity: "0"},"slow",function(){$(m).remove();})})}
