var good_browser = 0; var d_id = "dd1"; var offset = 0; var min_ns_width = 755; var lay_top = 0; var top_offset = 3; with (navigator) { if ( (appVersion.indexOf("MSIE")>0) && (parseInt(appVersion.substring(0,1))>=4) ) good_browser = 1; } function show_div(div_id) { hide_div(d_id); if (good_browser) { d_id = div_id; document.all[d_id].style.visibility = "visible"; } else { d_id = div_id; lay_top = document.layers[d_id].top; document.layers[d_id].top += top_offset; document.layers[d_id].visibility = "show"; } } function show_right_div(div_id) { // alert(document.forms[0].elements.length); hide_div(d_id); offset = parseInt( eval("document.forms[0].o" + div_id.substring(1) + ".value") ); if (good_browser) { d_id = div_id; document.all[d_id].style.left = document.all['b1'].scrollWidth - offset; document.all[d_id].style.visibility = "visible"; } else { d_id = div_id; lay_top = document.layers[d_id].top; document.layers[d_id].top += top_offset; document.layers[d_id].left = (window.innerWidth > min_ns_width ? window.innerWidth : min_ns_width ) - offset; //alert(window.innerWidth); // document.layers[d_id].left = document.ids['b1'].width - offset; document.layers[d_id].visibility = "show"; } } function nshow_div(div_id) { document.layers[d_id].visibility = "hide"; d_id = div_id; document.layers[d_id].visibility = "show"; return; } function nshow_right_div(div_id) { ind_a = div_id.indexOf('a'); if (ind_a<0) { offset = parseInt( eval("document.forms[0].o" + div_id.substring(1) + ".value") ); } else { offset = parseInt( eval("document.forms[0].o" + div_id.substring(1, parseInt(ind_a)) + ".value") ) } document.layers[d_id].visibility = "hide"; d_id = div_id; document.layers[d_id].left = (window.innerWidth > min_ns_width ? window.innerWidth : min_ns_width ) - offset; document.layers[d_id].visibility = "show"; return; } function hide_div(div_id) { if (good_browser) { document.all[div_id].style.visibility = "hidden"; } else { document.layers[div_id].visibility = "hide"; if (lay_top) { document.layers[div_id].top = lay_top; } } } function catch_event(e) { ev_x = e.pageX; hide_div(d_id); } function SetTextAndBGColor(layername,bgcolor,textcolor) { document.all[layername].style.backgroundColor='#'+bgcolor; document.all[layername].style.color='#'+textcolor; } function SetBGColor(layername,bgcolor) { document.all[layername].style.backgroundColor='#'+bgcolor; } function SetBGR(layername,backgroundfile) { document.all[layername].style.background='URL('+backgroundfile+')'; } function OpenWindow(WinURL,WinHandle) { window.open(WinURL,WinHandle,'toolbar=yes,scrollbars=yes,location=no,directories=no,status=no,menubar=no,resizable=no,width=600,height=400'); } function imgOpen(imgURL,imgWidth,imgHeight,Title) { var features; var top = (screen.height - imgHeight)/2, left = (screen.width - imgWidth)/2; if(top < 0) top = 0; if(left < 0) left = 0; features = ',top=' + top + ',left=' +left; var imgWndw=window.open('','winblank','width='+imgWidth+',height='+ imgHeight+',toolbar=no,menubar=no,location=no,status=no,'+ 'resizable=yes,scrollbars=no'+features); var imgTitle=(Title)?Title:imgURL+": "+imgWidth+'x'+imgHeight; with (imgWndw.document){ open(); write(''+imgTitle+''+ ''+imgTitle+
  ''); close(); } return false } $().ready(function() { $('#ModalLogin').jqm({ trigger: '.ModalLoginTrigger', overlay: 30, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */ overlayClass: 'whiteOverlay'}); /* make dialog draggable, assign handle to title */ // Close Button Highlighting. IE doesn't support :hover. Surprise? $('input.jqmdX') .hover( function(){ $(this).addClass('jqmdXFocus'); }, function(){ $(this).removeClass('jqmdXFocus'); }) .focus( function(){ this.hideFocus=true; $(this).addClass('jqmdXFocus'); }) .blur( function(){ $(this).removeClass('jqmdXFocus'); }); }); function check_length(message) { var maxLen = 500; var smessage=document.getElementById('smessage'); var smessagenum=document.getElementById('smessagenum'); if (smessage.value.length > maxLen) { alert('Слишком длинное сообщение'); smessage.value=smessage.value.substring(0, maxLen); } smessagenum.value = maxLen - smessage.value.length; } function svap_ls() { var isVisible = $('#rightls').css('display'); if(isVisible!='none') { $('#rg').slideUp("slow", function () {$('#rightls').css('display','none'); }); } else { $('#rightls').show(); $('#rg').slideDown("slow"); } }