brName = navigator.appName; brVer = navigator.appVersion; brAgent = navigator.userAgent;

isDOM = document.getElementById ? true:false;
isOpera = (window.opera && isDOM) ? true:false;
isOpera6 = (isOpera && window.print)? true:false;
isOpera7= (isOpera && document.readyState)? true:false;
isOpera8= /Opera[^\d]*8/.test(brAgent);
isOpera9= /Opera[^\d]*9/.test(brAgent);
isIE = (document.all && document.all.item && !isOpera)? true:false
isSafari=/\WSafari\W/.test(brAgent);
isNN= (brName=="Netscape")? true:false;
isMozilla= (isNN && isDOM)? true:false;

function ñhooseBlock(block){
	for(i=0;i<blocks_length;i++){
		if(document.getElementById('block_content_part'+(i+1))!=undefined){
		document.getElementById('block_content_part'+(i+1)).style.display = (i == block-1)? 'block' : 'none';
		document.getElementById('block_menu_sort'+(i+1)).className = (i == block-1)? 'selected' : '';
		}
	}
}

function Pic(Width,Height,Path,Name) {
	var p = Math.ceil(Math.random()*10000);
	var q = Math.ceil(Math.random()*p);
	_width = parseInt(Width)+20; _height = parseInt(Height)+20;
	windowName = p+'X'+(Width*p)+(Height*q);
	WinFeatures = "top="+(screen.height-Height)/2+",left="+(screen.width-Width)/2+",width="+_width+",height="+_height+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no";
	w = window.open("",windowName,WinFeatures);
	w.document.open();
	w.document.write("<head><title>"+Name+"</title></head>");
	w.document.write("<body bgcolor=#F6F2E8 leftmargin='9' topmargin='9' marginwidth='9' marginheight='9'><IMG src='"+Path+"' height='"+Height+"' width='"+Width+"' alt='"+Name+"' border=1></body>"); 
	w.document.close();
}
