Array.prototype.inArray = function (value) { var i; for (i=0; i < this.length; i++) { if (this[i] == value) { return true; } } return false; }; Array.prototype.inArrayStrict = function (value) { var i; for (i=0; i < this.length; i++) { if (this[i] === value) { return true; } } return false; }; function openPic(image, width, height) { var win; if( win ) { win.close(); } win = window.open( '', 'win', 'location=0, toolbar=0, menubar=0, scrollbars=yes, height='+height+', width='+width+', status=0' ); win.document.write( 'Starnet' ); win.document.write( '' ); win.document.write( '' ); win.document.write( '' ); win.document.close(); } function openGallery(url) { var winGal; if( winGal ) { winGal.close(); } winGal = window.open( 'http://www.starnet.ru/' + url, 'winGal', 'location=0, toolbar=0, menubar=0, scrollbars=yes, height=600, width=530, status=0' ); } function showSpecList() { var slWin; if( slWin ) { slWin.close(); } slWin = window.open( 'http://www.starnet.ru/speclist', 'slWin', 'location=0, toolbar=0, menubar=0, scrollbars=yes, height=520, width=675, status=0' ); } function showBankForm() { var bankWin; if( bankWin ) { bankWin.close(); } bankWin = window.open( 'http://www.starnet.ru/bankform', 'bankWin', 'location=0, toolbar=0, menubar=0, scrollbars=yes, height=600, width=675, status=0' ); } function showBankNotify() { var bankWin; if( bankWin ) { bankWin.close(); } bankWin = window.open( 'http://www.starnet.ru', 'bankWin', 'location=0, toolbar=0, menubar=0, scrollbars=yes, height=720, width=675, status=0' ); } function openSelectAddress(streetid, streetname, houseid, housename, minstate, address, err) { var selectAddress; if( selectAddress ) { selectAddress.close(); } if(typeof(streetid) != 'undefined' && streetid != null || typeof(houseid) != 'undefined' && houseid != null || typeof(address) != 'undefined' && address != null) { href = 'http://www.starnet.ru/selectaddress.php?'; if(typeof(streetid) != 'undefined' && streetid != null) href += 'streetid='+streetid+'&'; if(typeof(streetname) != 'undefined' && streetname != null) href += 'streetname='+streetname+'&'; if(typeof(houseid) != 'undefined' && houseid != null) href += 'houseid='+houseid+'&'; if(typeof(housename) != 'undefined' && housename != null) href += 'housename='+housename+'&'; if(typeof(minstate) != 'undefined' && minstate != null) href += 'minstate='+minstate+'&'; if(typeof(address) != 'undefined' && address != null) href += 'address='+address+'&'; if(typeof(err) != 'undefined' && err != null) href += 'err='+err+'&'; selectAddress = window.open( href, 'selectAddress', 'location=0, toolbar=0, menubar=0, scrollbars=yes, height=373, width=500, status=0' ); } } var shl_cursid; function showHousesList(sid) { if(shl_cursid) { blck = document.getElementById('count_'+shl_cursid); blck.style.display = 'block'; blck = document.getElementById('list_'+shl_cursid); blck.style.display = 'none'; shl_cursid = null; } if(sid) { blck = document.getElementById('count_'+sid); blck.style.display = 'none'; blck = document.getElementById('list_'+sid); blck.style.display = 'block'; shl_cursid = sid; } } function createCookie(name,value,days,path) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; if (!path) path = "/"; document.cookie = name+"="+value+expires+"; path="+path; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name,path) { createCookie(name,"",-1,path); } function insertFlash(src, width, height) { document.writeln (''); document.writeln (''); document.writeln (''); document.writeln (''); document.writeln (''); document.writeln (''); document.writeln (''); }