//window.onerror=function(){return true;} function view_foto(adr,w,h){ var new_foto=window.open('view_foto.php?adr='+adr,'','width='+w+',height='+h); } function set_rezume(id){ var setrezume=window.open("set_rezume.php?id="+id,'set_rezume','width=700,height=600'); } function emailvalidator(arg){ reg=/^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i; if(arg!='' && reg.test(arg))return true; else return false; } function change_lang(lang){ var ajax=new ajax_class("ajax_change_lang"); var query_string="action=change_lang&lang="+lang; ajax.ajax("GET","maction.php?"+query_string); ajax.callback(null); delete ajax; return false; } function ajax_change_lang(arg){ //alert(arg); location.reload(); } function loginvalidator(arg){ var reg=/[^a-zA-Z0-9_]/; if(!reg.test(arg))return false; else return true; } function bgfon(obj,name){ document.getElementById(obj).style.backgroundColor=name; } function count_simbols(nam,limit,remname){ if(document.getElementById(nam).value.length>limit){ document.getElementById(nam).value=document.getElementById(nam).value.substring(0,limit); document.getElementById(nam).scrollTop=document.getElementById(nam).scrollHeight; } estatessimb=limit-document.getElementById(nam).value.length; estatessimb=(estatessimb<0)?0:estatessimb; document.getElementById(remname).innerHTML=estatessimb; } function set_auth(form){ if(eval(form+".authlogin.value")==''){alert('Не указан логин');return false;} if(eval(form+".authpass.value")==''){alert('Не указан пароль');eval(form+".authpass.focus();"); return false;} else eval(form+".submit();"); } function view_img(id,alt){ var viewimg=window.open('view_img.php?id='+id+'&alt='+escape(alt),'','width=100,height=100,status=1'); } function setFormElements(e,name){ var targetElement=e.target?e.target:e.srcElement; targetElement.className=name; } function showmenu(id){ menu="menu_container_"+id; ar=objectXY(id); document.getElementById(id).className='item_container_active'; if(document.getElementById(menu)){ document.getElementById(menu).style.left=ar[0]; document.getElementById(menu).style.visibility='visible'; } } function showmenusub(id){ menu="menu_container_"+id; ar=objectXY("sub_"+id); document.getElementById(id).className='item_container_active'; if(document.getElementById(menu)){ document.getElementById(menu).style.left=ar[0]+10; document.getElementById(menu).style.top=ar[1]-10; document.getElementById(menu).style.visibility='visible'; } } function hidemenu(id){ menu="menu_container_"+id; document.getElementById(id).className='item_container_noactive'; if(document.getElementById(menu))document.getElementById(menu).style.visibility='hidden'; } function setclassName(obj,name){ document.getElementById(obj).className=name; } function objectXY(obj) { var dobj=eval('document.getElementById("'+obj+'")') var x = 0, y = 0; do{ x += dobj.offsetLeft; y += dobj.offsetTop; }while (typeof(dobj = dobj.offsetParent) != 'undefined' && dobj != null); return [x,y]; } function loc(url){ window.location.href=url; } function objectXY(obj) { var dobj=eval('document.getElementById("'+obj+'")') var x = 0, y = 0; do{ x += dobj.offsetLeft; y += dobj.offsetTop; }while (typeof(dobj = dobj.offsetParent) != 'undefined' && dobj != null); return [x,y]; } function bgf(name,color){ name.style.backgroundColor=color; } function win_resize(e,intWidth,intHeight){ var newW=(intWidth==null || intWidth=='' || isNaN(parseInt(intWidth)))? 800 : parseInt(intWidth); var newH=(intHeight==null || intHeight=='' || isNaN(parseInt(intHeight)))? 800 : parseInt(intHeight); if(is_ie4 || is_ie){newW+=10;newH+=29;} if(is_ns4 || is_ns){newW+=6;newH+=27;} if(is_opera){newW+=10;newH+=29;} if(is_firefox){newW+=0;newH+=22;} if(screen.width>newW)newLeft=Math.round((screen.width-newW)/2); else newLeft=10; if(screen.height>newH)newTop=Math.round((screen.height-newH)/2); else newTop=10; newH+=20; e.resizeTo(newW,newH); e.moveTo(newLeft,newTop); } function move_window_to_center_screen(){ if(is_ns4 || is_ns){ leftco=document.body.offsetWidth+16; topco=document.body.offsetHeight+44; } if(is_ie || is_ie4 || is_firefox){ leftco=document.body.clientWidth; topco=document.body.clientHeight; } if(is_opera){ leftco=document.body.clientWidth; topco=document.body.clientHeight+200; } newLeft=Math.round((screen.width-leftco)/2); newTop=Math.round((screen.height-topco)/2); window.moveTo(newLeft,newTop); } var userAgent = navigator.userAgent.toLowerCase(); var is_opera = (userAgent.indexOf('opera') != -1); var is_firefox = (userAgent.indexOf('firefox') != -1); var is_saf = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == 'Apple Computer, Inc.')); var is_webtv = (userAgent.indexOf('webtv') != -1); var is_ie = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv)); var is_ie4 = ((is_ie) && (userAgent.indexOf('msie 4.') != -1)); var is_moz = ((navigator.product == 'Gecko') && (!is_saf)); var is_kon = (userAgent.indexOf('konqueror') != -1); var is_ns = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf)); var is_ns4 = ((is_ns) && (parseInt(navigator.appVersion) == 4)); var is_mac = (userAgent.indexOf('mac') != -1); var curtainLeft=150; var curtainRight=150; var curtaintimeout=1; function open_search_block(){ coords_search_block=objectXY('search_link'); document.getElementById('search_container').style.left=coords_search_block[0]-70; document.getElementById('search_container').style.top=coords_search_block[1]+25; var curtainstepsop=20; var curtainWidth=300; if(curtainLeft>0){ curtainRight+=curtainstepsop; curtainLeft-=curtainstepsop; var rect = 'rect(auto, '+ curtainRight +'px, auto, '+ curtainLeft +'px)'; document.getElementById("search_container").style.clip = rect; setTimeout(open_search_block,curtaintimeout); } } function close_search_block(){ var curtainstepscl=20; if(curtainLeft