function get_client_info(browser){ var agt=navigator.userAgent.toLowerCase(); // *** BROWSER VERSION *** // Note: On IE5, these return 4, so use is_ie5up to detect IE5. var is_major = parseInt(navigator.appVersion); var is_minor = parseFloat(navigator.appVersion); // Note: Opera and WebTV spoof Navigator. We do strict client detection. // If you want to allow spoofing, take out the tests for opera and webtv. var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)); var is_nav2 = (is_nav && (is_major == 2)); var is_nav3 = (is_nav && (is_major == 3)); var is_nav4 = (is_nav && (is_major == 4)); var is_nav4up = (is_nav && (is_major >= 4)); var is_navonly = (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1))); var is_nav6 = (is_nav && (is_major == 5)); var is_nav6up = (is_nav && (is_major >= 5)); var is_gecko = (agt.indexOf('gecko') != -1); var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); var is_ie3 = (is_ie && (is_major < 4)); var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) ); var is_ie4up = (is_ie && (is_major >= 4)); var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) ); var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1)); var is_ie5up = (is_ie && !is_ie3 && !is_ie4); var is_ie5_5up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5); var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) ); var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5); // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser // or if this is the first browser window opened. Thus the // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable. var is_aol = (agt.indexOf("aol") != -1); var is_aol3 = (is_aol && is_ie3); var is_aol4 = (is_aol && is_ie4); var is_aol5 = (agt.indexOf("aol 5") != -1); var is_aol6 = (agt.indexOf("aol 6") != -1); var is_opera = (agt.indexOf("opera") != -1); var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1); var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1); var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1); var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1); var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4); var is_webtv = (agt.indexOf("webtv") != -1); var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); var is_AOLTV = is_TVNavigator; var is_hotjava = (agt.indexOf("hotjava") != -1); var is_hotjava3 = (is_hotjava && (is_major == 3)); var is_hotjava3up = (is_hotjava && (is_major >= 3)); // *** JAVASCRIPT VERSION CHECK *** var is_js; if (is_nav2 || is_ie3) is_js = 1.0; else if (is_nav3) is_js = 1.1; else if (is_opera5up) is_js = 1.3; else if (is_opera) is_js = 1.1; else if ((is_nav4 && (is_minor <= 4.05)) || is_ie4) is_js = 1.2; else if ((is_nav4 && (is_minor > 4.05)) || is_ie5) is_js = 1.3; else if (is_hotjava3up) is_js = 1.4; else if (is_nav6 || is_gecko) is_js = 1.5; // NOTE: In the future, update this code when newer versions of JS // are released. For now, we try to provide some upward compatibility // so that future versions of Nav and IE will show they are at // *least* JS 1.x capable. Always check for JS version compatibility // with > or >=. else if (is_nav6up) is_js = 1.5; // NOTE: ie5up on mac is 1.4 else if (is_ie5up) is_js = 1.3 // HACK: no idea for other browsers; always check for JS version with > or >= else is_js = 0.0; // *** PLATFORM *** var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) ); // NOTE: On Opera 3.0, the userAgent string includes "Windows 95/NT4" on all // Win32, so you can't distinguish between Win95 and WinNT. var is_win95 = ((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1)); // is this a 16 bit compiled version? var is_win16 = ((agt.indexOf("win16")!=-1) || (agt.indexOf("16bit")!=-1) || (agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("windows 16-bit")!=-1) ); var is_win31 = ((agt.indexOf("windows 3.1")!=-1) || (agt.indexOf("win16")!=-1) || (agt.indexOf("windows 16-bit")!=-1)); var is_winme = ((agt.indexOf("win 9x 4.90")!=-1)); var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1)); // NOTE: Reliable detection of Win98 may not be possible. It appears that: // - On Nav 4.x and before you'll get plain "Windows" in userAgent. // - On Mercury client, the 32-bit version will return "Win98", but // the 16-bit version running on Win98 will still return "Win95". var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1)); var is_winnt = ((agt.indexOf("winnt")!=-1) || (agt.indexOf("windows nt")!=-1)); var is_win32 = (is_win95 || is_winnt || is_win98 || ((is_major >= 4) && (navigator.platform == "Win32")) || (agt.indexOf("win32")!=-1) || (agt.indexOf("32bit")!=-1)); var is_os2 = ((agt.indexOf("os/2")!=-1) || (navigator.appVersion.indexOf("OS/2")!=-1) || (agt.indexOf("ibm-webexplorer")!=-1)); var is_mac = (agt.indexOf("mac")!=-1); // hack ie5 js version for mac if (is_mac && is_ie5up) is_js = 1.4; var is_mac68k = (is_mac && ((agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1))); var is_macppc = (is_mac && ((agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1))); var is_sun = (agt.indexOf("sunos")!=-1); var is_sun4 = (agt.indexOf("sunos 4")!=-1); var is_sun5 = (agt.indexOf("sunos 5")!=-1); var is_suni86 = (is_sun && (agt.indexOf("i86")!=-1)); var is_irix = (agt.indexOf("irix") !=-1); // SGI var is_irix5 = (agt.indexOf("irix 5") !=-1); var is_irix6 = ((agt.indexOf("irix 6") !=-1) || (agt.indexOf("irix6") !=-1)); var is_hpux = (agt.indexOf("hp-ux")!=-1); var is_hpux9 = (is_hpux && (agt.indexOf("09.")!=-1)); var is_hpux10 = (is_hpux && (agt.indexOf("10.")!=-1)); var is_aix = (agt.indexOf("aix") !=-1); // IBM var is_aix1 = (agt.indexOf("aix 1") !=-1); var is_aix2 = (agt.indexOf("aix 2") !=-1); var is_aix3 = (agt.indexOf("aix 3") !=-1); var is_aix4 = (agt.indexOf("aix 4") !=-1); var is_linux = (agt.indexOf("inux")!=-1); var is_sco = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1); var is_unixware = (agt.indexOf("unix_system_v")!=-1); var is_mpras = (agt.indexOf("ncr")!=-1); var is_reliant = (agt.indexOf("reliantunix")!=-1); var is_dec = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) || (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) || (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1)); var is_sinix = (agt.indexOf("sinix")!=-1); var is_freebsd = (agt.indexOf("freebsd")!=-1); var is_bsd = (agt.indexOf("bsd")!=-1); var is_unix = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux || is_sco ||is_unixware || is_mpras || is_reliant || is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd); var is_vms = ((agt.indexOf("vax")!=-1) || (agt.indexOf("openvms")!=-1)); if (browser==1) { if (is_ie) return "ie"; if (is_gecko) return "gecko"; } } // base64 encode/decode functions function urlDecode(str){ str=str.replace(new RegExp('\\+','g'),' '); return unescape(str); } function urlEncode(str){ str=escape(str); str=str.replace(new RegExp('\\+','g'),'%2B'); return str.replace(new RegExp('%20','g'),'+'); } var END_OF_INPUT = -1; var base64Chars = new Array( 'A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X', 'Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3', '4','5','6','7','8','9','+','/' ); var reverseBase64Chars = new Array(); for (var i=0; i < base64Chars.length; i++){ reverseBase64Chars[base64Chars[i]] = i; } var base64Str; var base64Count; function setBase64Str(str){ base64Str = str; base64Count = 0; } function readBase64(){ if (!base64Str) return END_OF_INPUT; if (base64Count >= base64Str.length) return END_OF_INPUT; var c = base64Str.charCodeAt(base64Count) & 0xff; base64Count++; return c; } function encodeBase64(str){ setBase64Str(str); var result = ''; var inBuffer = new Array(3); var lineCount = 0; var done = false; while (!done && (inBuffer[0] = readBase64()) != END_OF_INPUT){ inBuffer[1] = readBase64(); inBuffer[2] = readBase64(); result += (base64Chars[ inBuffer[0] >> 2 ]); if (inBuffer[1] != END_OF_INPUT){ result += (base64Chars [(( inBuffer[0] << 4 ) & 0x30) | (inBuffer[1] >> 4) ]); if (inBuffer[2] != END_OF_INPUT){ result += (base64Chars [((inBuffer[1] << 2) & 0x3c) | (inBuffer[2] >> 6) ]); result += (base64Chars [inBuffer[2] & 0x3F]); } else { result += (base64Chars [((inBuffer[1] << 2) & 0x3c)]); result += ('='); done = true; } } else { result += (base64Chars [(( inBuffer[0] << 4 ) & 0x30)]); result += ('='); result += ('='); done = true; } lineCount += 4; if (lineCount >= 76){ result += ('\n'); lineCount = 0; } } return result; } function readReverseBase64(){ if (!base64Str) return END_OF_INPUT; while (true){ if (base64Count >= base64Str.length) return END_OF_INPUT; var nextCharacter = base64Str.charAt(base64Count); base64Count++; if (reverseBase64Chars[nextCharacter]){ return reverseBase64Chars[nextCharacter]; } if (nextCharacter == 'A') return 0; } return END_OF_INPUT; } function ntos(n){ n=n.toString(16); if (n.length == 1) n="0"+n; n="%"+n; return unescape(n); } function decodeBase64(str){ setBase64Str(str); var result = ""; var inBuffer = new Array(4); var done = false; while (!done && (inBuffer[0] = readReverseBase64()) != END_OF_INPUT && (inBuffer[1] = readReverseBase64()) != END_OF_INPUT){ inBuffer[2] = readReverseBase64(); inBuffer[3] = readReverseBase64(); result += ntos((((inBuffer[0] << 2) & 0xff)| inBuffer[1] >> 4)); if (inBuffer[2] != END_OF_INPUT){ result += ntos((((inBuffer[1] << 4) & 0xff)| inBuffer[2] >> 2)); if (inBuffer[3] != END_OF_INPUT){ result += ntos((((inBuffer[2] << 6) & 0xff) | inBuffer[3])); } else { done = true; } } else { done = true; } } return result; } var digitArray = new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'); function toHex(n){ var result = '' var start = true; for (var i=32; i>0;){ i-=4; var digit = (n>>i) & 0xf; if (!start || digit != 0){ start = false; result += digitArray[digit]; } } return (result==''?'0':result); } function pad(str, len, pad){ var result = str; for (var i=str.length; i127) { // alert("Ths username contains invalid characters."); return false; } } for (i=0; i127) { // alert("Ths domain name contains invalid characters."); return false; } } if (user.match(userPat)==null) { // alert("The username doesn't seem to be valid."); return false; } var IPArray=domain.match(ipDomainPat); if (IPArray!=null) { for (var i=1;i<=4;i++) { if (IPArray[i]>255) { // alert("Destination IP address is invalid!"); return false; } } return true; } var atomPat=new RegExp("^" + atom + "$"); var domArr=domain.split("."); var len=domArr.length; for (i=0;i"; error_msg_obj.className="shown"; setTimeout('hide (error_msg_obj)', 2000); } function popup(image_path){ document.getElementById('big_image_div').style.display="block"; document.getElementById('big_image_div').innerHTML=""; if (document.getElementById('big_image').width>600){ old_width = document.getElementById('big_image').width; old_height = document.getElementById('big_image').height; new_width = 600; new_height = (old_height*600)/old_width; document.getElementById('big_image').width = new_width; document.getElementById('big_image').height = new_height; } else{ new_width = document.getElementById('big_image').width; new_height = document.getElementById('big_image').height; } if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } document.getElementById('big_image_div').style.left = (winW/2)-(new_width/2); document.getElementById('big_image_div').style.top = (winH/2)-(new_height/2); } function del_popup(){ document.getElementById('big_image_div').style.display="none"; } function search_shop(select_fld){ value = select_fld[select_fld.selectedIndex].value; mag_name = select_fld[select_fld.selectedIndex].innerHTML; window.location = '/?page=pagini_list&PageId=Magazine_11&ArticleId='+mag_name+'_'+value; } function popUp(URL, id, width, height, uateva){ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=698,left = 50,top = 50');"); } // function to print movie in a div called movie_div function print_movie(src){ document.getElementById('movie_div').innerHTML = '
'; document.getElementById('movie_div').className = 'shown'; } function show_big_image(image_path){ if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } document.getElementById('big_image_div').style.top = document.body.scrollTop+(winH/2-200); document.getElementById('big_image_div').style.backgroundColor = "white"; document.getElementById('big_image_div').style.left = (winW/2-16); document.getElementById('big_image_div').className="shown"; document.getElementById('big_image').src='img/loading.gif'; makeRequest('/includes/inc/show_big_img.inc.php?link='+image_path, 'self', 'big_image_div2'); align_big_image(); } var new_img=0; function align_big_image(){ if (new_img==1) { document.getElementById('big_image_div').innerHTML = ""; document.getElementById('big_image_div2').innerHTML = ""; new_img = 0; setTimeout('align_big_image()', 100); return false; } if (!document.getElementById('big_width')) { setTimeout('align_big_image()', 100); return false; } document.getElementById('big_image_div').style.backgroundColor = '#D6D6D6'; document.getElementById('big_image_div').style.left = (winW/2-document.getElementById('big_width').value/2); document.getElementById('big_image_div').style.top = (winH/2-document.getElementById('big_height').value/2); document.getElementById('big_image_div').innerHTML = document.getElementById('big_image_div2').innerHTML; new_img = 1; return true; } function close_big_image(){ document.getElementById('big_image_div').className="hidden"; } function verify_contact_form(form){ if (form.nume.value==""){ alert ('Va rugam sa introduceti numele !'); return false; } if (form.prenume.value==""){ alert ('Va rugam sa introduceti prenumele !'); return false; } if (form.email.value==""){ alert ('Va rugam sa introduceti o adresa de e-mail !'); return false; } if (!emailCheck(form.email.value)){ alert ('email2_err_msg'); return false; } if (form.domeniu[form.domeniu.selectedIndex].value=="-"){ alert ('Va rugam sa selectati un domeniu de interes !'); return false; } if (form.mesaj.value==""){ alert ('Va rugam sa introduceti mesajul !'); return false; } return true; } function verify_list_your_property_form(form_id){ if (form_id.zona.value==""){ alert ('Va rugam sa introduceti zona !'); return false; } if (form_id.adresa.value==""){ alert ('Va rugam sa introduceti adresa !'); return false; } if (form_id.tip.value==""){ alert ('Va rugam sa introduceti tipul proprietatii !'); return false; } if (form_id.suprafata_construita.value==""){ alert ('Va rugam sa introduceti suprafata construita !'); return false; } if (form_id.suprafata_utila.value==""){ alert ('Va rugam sa introduceti suprafata utila !'); return false; } if (form_id.teren.value==""){ alert ('Va rugam sa introduceti suprafata terenului !'); return false; } if (form_id.utilitati_facilitati.value==""){ alert ('Va rugam sa introduceti utilitati/facilitati !'); return false; } if (form_id.alte_detalii.value==""){ alert ('Va rugam sa introduceti alte detalii !'); return false; } if (form_id.nume.value==""){ alert ('Va rugam sa introduceti numele !'); return false; } if (form_id.prenume.value==""){ alert ('Va rugam sa introduceti prenumele !'); return false; } if (form_id.telefon.value==""){ alert ('Va rugam sa introduceti un numar de telefon !'); return false; } if (form_id.email.value==""){ alert ('Va rugam sa introduceti o adresa de e-mail !'); return false; } document.getElementById('list_your_property_form').submit(); } function upload_another(){ http=createRequestObject(); if (max_upload!=3) makeRequest('upload_another.inc.php', 'self', 'uploader'); } function print_send_this_page_form(){ if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { winW = window.innerWidth; winH = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { winW = document.body.offsetWidth; winH = document.body.offsetHeight; } } document.getElementById('send_form').style.top = document.body.scrollTop+(winH/2-100); document.getElementById('send_form').style.backgroundColor = "white"; document.getElementById('send_form').style.left = (winW/2-139); document.getElementById('send_form').className="shown"; } function div_close(did){ did.className="hidden"; } function div_close_send(){ document.getElementById('send_form').className="hidden"; makeRequest('new_form.php', 'self', 'send_form'); } function trimite_unui_amic(form_id){ href = location.href; href = encodeBase64(href); url='nume_a='+form_id.sender_name.value+'&email_a='+form_id.sender_email.value+'&nume_b='+form_id.dest_name.value+'&email_b='+form_id.dest_email.value+'&link='+href; url = encodeBase64(url); url = 'send_to_friend.php?url='+url; makeRequest(url, 'self', 'send_form'); setTimeout('div_close_send();', 3000); }