d = document;
opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
ie = (document.all && !opera)? true : false;
dom = (document.getElementById && !ie && !opera)? true : false;

if (dom || ie)
{
        d.writeln('<STYLE type="text/css">');
        d.writeln('.subcat { display: none; }');
        d.writeln('</STYLE>');
}

function zoom(gal,wid,hei)
{
var n1=parseInt(wid);
var n2=parseInt(hei);
var wid2 = n1+5;
var hei2 = n2+10;
window.open(gal, 'gellery', "scrollbars=0,resizable=no,left=0,top=0,width="+wid2+",height="+hei2);
}

function foto(title, img, width, height, pr) {
	var width=(width ? width : 800);
	var height=(height ? height : 600);
	var win=window.open('', '_blank', 'width='+width+', height='+height+', left='+((screen.width-width)/2)+', top='+((screen.height-height)/2)+', toolbar=no, menubar=no, resizable=yes, status=yes, location=no, alwaysRaised=yes, scrollbars=no');
	win.document.write('<html><head><title>'+title+'</title></head><body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" rightmargin="0"><table width="100%" cellpadding="0" cellspacing="0" border="0" height="100%"><tr><td width="100%" align="center"><img src="/'+img+'" border="0" style="border:1px solid #bbbbbb;"></td></tr></table></body></html>');
}

function subm(){
$(':checkbox[name=usl]').each(function(){ if (this.checked == true){$('#btn_reg').attr("disabled","");} else {$('#btn_reg').attr("disabled","disabled");} });
}


var massbanner = new Array(); //баннеры

function ban(x) {
massbanner.push(x);	
}



function banview() {

//for (i = 0; i < massbanner.length; i++){
//alert("Показывается площадка: "+massbanner[i]);
//}

if (massbanner[0]){$.getScript('/banner.js?bn=massbanner');}

}

function generatekey() {
var length = 8;
var symbols = "abcdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";

   var result = "";
   for (var i=0; i<length; i++) {
      result += symbols.charAt(Math.floor(Math.random()*symbols.length));
   };
   return result;

}


function inforubr(id){

$('#inf > span').hide();
$('#i'+id).show();

}


function lbox(){

$(function() {$('[href$=jpg]').lightBox({image:"Картинка", txtImage:'Фото',txtOf:'из'} );});
$(function() {$('[href$=jpeg]').lightBox({image:"Картинка", txtImage:'Фото',txtOf:'из'} );});
$(function() {$('[href$=gif]').lightBox({image:"Картинка", txtImage:'Фото',txtOf:'из'} );});

}



