function processSimpleAsyncReqForModule( modulename, lt, add, inst ){$.ajax({ type: 'POST', url: '/getblock', data : 'ext=1&type=100&module=' + modulename + '&localtype=' + lt + add, success: function ( data ) { if( inst ) { eval( inst ); } }});}function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure ){ var cookie_string = name + "=" + escape ( value ); if ( exp_y ) { var expires = new Date ( exp_y, exp_m, exp_d ); cookie_string += "; expires=" + expires.toGMTString(); } if ( path ) cookie_string += "; path=" + escape ( path ); if ( domain ) cookie_string += "; domain=" + escape ( domain ); if ( secure ) cookie_string += "; secure"; document.cookie = cookie_string;}function ge( el ){return document.getElementById( el );}function gen( el ){return document.getElementByName( el );}function snv( el, val ){var e = ge( el );if( e )e.value = val;}function checkStringForExistOfSymbols( str, smb ){var sl = str.length;var scl = smb.length;for( a = 0; a < sl; a++ ) {var c = str.charAt( a );var here = false;for( i = 0; i < scl; i++ ) {if( c == smb.charAt( i ) ) {here = true;break;}}if( !here ) {return false;}}return true;}function getBounds( obj ){var w=obj.offsetWidth;var h=obj.offsetHeight;var x=y=0;while(obj){x+=obj.offsetLeft;y+=obj.offsetTop;obj=obj.offsetParent;}return{x:x,y:y,width:w,height:h};}function getCurrentMouseCoords( event ){e = event || window.event;if( e.pageX == null && e.clientX != null ) { var html = document.documentElement; var body = document.body; e.pageX = e.clientX + (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0); e.pageY = e.clientY + (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0); } return e;}function digitsToBold( backup ){len = backup.length;nnew = "";bUsed=0;slashB=0;start=0;for( i = 0; i < len; i++ ) {if(backup.charCodeAt( i ) >= 48 && backup.charCodeAt( i ) <= 57 ) {start = 1;if( bUsed != 1 ) {nnew = nnew + "";bUsed = 1;}} else {if( bUsed == 1 && start == 1 )slashB = 1;start = 0;}if( slashB == 1 ) {nnew = nnew + "";slashB = 0;bUsed = 0;}nnew = nnew + backup[i];}if( start == 1 )nnew = nnew + "";return nnew;}function getDigitsIE( backup ){var len = backup.length;var nnew = "";for( i = 0; i < len; i++ ) {if( backup.charCodeAt( i ) >= 48 && backup.charCodeAt( i ) <= 57 ) {nnew += backup.charAt( i );}}return nnew;}function mtRand( min, max ){return Math.floor( Math.random() * ( max - min + 1 ) ) + min;}function mkPass( len ){var len = len ? len : 14;var pass = '';var rnd = 0;var c = '';for( i = 0; i < len; i++ ) {rnd = mtRand( 0, 2 );if( rnd == 0 )c = String.fromCharCode( mtRand( 48, 57 ) );else if( rnd == 1 )c = String.fromCharCode( mtRand( 65, 90 ) );else if( rnd == 2 )c = String.fromCharCode( mtRand( 97, 122 ) );pass += c;}return pass;}function getTextBlock( btype, el ){$.post( '/getblock', { ext: '1', type: btype, toplace: el }, function ( data ) { if( data == null || data == 'Undefined query states' ) return; var arr = data.split( '##' );$( '#' + arr[0] ).html( arr[1] );if( arr.length > 2 && arr[2] != 'undefined' )$( '#' + arr[2] ).attr( 'value', arr[3] ); });}function getTextBlockForModule( modulename, lt, el, add ){$.post( '/getblock', { ext: '1', type: '100', module: modulename, localtype: lt, additional: add }, function ( data ) { if( data == null || data == 'Undefined query states' ) return; $( '#' + el ).html( data ); });}function showCommentWindowFromListings( list_id, element_id, event ){e = getCurrentMouseCoords( event );$( '#com_flow_window' ).hide();$( '#com_flow_window_inner' ).html( $.ajax({ type: 'POST', url: '/getblock', async: false, data: 'ext=1&type=99&list_id=' + list_id + '&el_id=' + element_id }).responseText );$( '#com_flow_window' ).css( 'left', e.pageX + 10 ).css( 'top', e.pageY + 10 ).show().end();}function removeListElement( el_id, from, where, what ){var ar = from.value.toString().split( '@@' );var newvalue = '';for( var a = 0; a < ar.length; a++ ) {var arr = ar[a].toString().split( '^^' );var t = '';if( arr.length > 1 ) {t = arr[0];} else {t = ar[a];}if( t == el_id )continue;newvalue += ( newvalue != '' ? '@@' : '' ) + ( arr.length > 1 ? completeArr( arr, "^^" ) : ar[a] );}from.value = newvalue;where.removeChild( what );}function completeArr( arr, spliter ){var nv = '';for( var a = 0; a < arr.length; a++ ) {nv += ( nv != '' ? "^^" : "" ) + arr[a];}return nv;}function pri( formname, modulename ){$( '#fine' ).attr( 'value', 1 );var s = strrev( e( $( '#' + formname ).serialize() ) );s = $.ajax({ type: 'POST', url: '/getblock', async: false, data: 'ext=1&type=100&module=' + modulename + '&localtype=2&d=' + s }).responseText;if( !s || s == '0' )return false;return true;}function pri_simple( formname ){$( '#fine' ).attr( 'value', 1 );return strrev( e( $( '#' + formname ).serialize() ) );}function pri_edit( formname, modulename ){$( '#fine' ).attr( 'value', 1 );var s = strrev( e( $( '#' + formname ).serialize() ) );s = $.ajax({ type: 'POST', url: '/getblock', async: false, data: 'ext=1&type=100&module=' + modulename + '&localtype=3&d=' + s }).responseText;if( !s || s == '0' )return false;return true;}function ssf( formname, modulename, localtype, add_data ){var s = strrev( e( $( '#' + formname ).serialize() ) );s = $.ajax({ type: 'POST', url: '/getblock', async: false, data: 'ext=1&type=100&module=' + modulename + '&localtype=' + localtype + '&d=' + s + ( add_data ? add_data : '' ) }).responseText;return s;}function e( t ){var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output = "";var chr1, chr2, chr3, enc1, enc2, enc3, enc4;var i = 0;t = eu(t); while (i < t.length) { chr1 = t.charCodeAt(i++);chr2 = t.charCodeAt(i++);chr3 = t.charCodeAt(i++);enc1 = chr1 >> 2;enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);enc4 = chr3 & 63; if (isNaN(chr2)) {enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;} output = output +_keyStr.charAt(enc1) + _keyStr.charAt(enc2) +_keyStr.charAt(enc3) + _keyStr.charAt(enc4); } return output;}function eu( t ){t = t.replace(/\r\n/g,"\n");var utftext = ""; for (var n = 0; n < t.length; n++) { var c = t.charCodeAt(n); if (c < 128) {utftext += String.fromCharCode(c);}else if((c > 127) && (c < 2048)) {utftext += String.fromCharCode((c >> 6) | 192);utftext += String.fromCharCode((c & 63) | 128);}else {utftext += String.fromCharCode((c >> 12) | 224);utftext += String.fromCharCode(((c >> 6) & 63) | 128);utftext += String.fromCharCode((c & 63) | 128);}} return utftext;}function strrev( s ){var ret = '', i = 0;for( i = s.length - 1; i >= 0; i-- ) ret += s.charAt(i);return ret;}function getNextSelectElement( list, selectedItem, el_to_place, number_to_place ){for( var a = number_to_place; a < number_to_place + 10; a++ ) {if( !ge( 'next_' + el_to_place + '_' + a ) )break;$( '#next_' + el_to_place + '_' + a ).html( '' );}if( selectedItem == 0 )return;$.post( '/', { checkgetlisting: '1', listid: list, selected: selectedItem, etp: el_to_place, ntp: number_to_place }, function ( data ) { if( !data || data == null || data == 'Undefined query states' ) return; $( '#next_' + el_to_place + '_' + number_to_place ).html( data ); });}