function popup(U,W,H,b){
var s=(typeof(screen)=='object'?screen:false); var SW=(s?(s.availWidth?s.availWidth:s.width):640),SH=(s?(s.availHeight?s.availHeight:s.height):480),X=(SW>W?((SW/2)-(W/2)):0),Y=(SH>H?((SH/2)-(H/2)):0);var k=window.open(U,"","scrollbars="+((b||SW<W||SH<H)?'1':'0')+",toolbar=0,status=0,menubar=0,directories=0,resizable="+((SW<W||SH<H)?'1,maximized=1':'0')+",location=0,"+(s?"width="+(SW<W?SW:W)+",height="+(SH<H?SH:H)+",":'')+"left="+X+",top="+Y+",screenX="+X+",screenY="+Y+',modal=1');if(k.focus){k.focus()};
return k;
}
function wpopup(U,W,H,b){
 popup(U,W,H,b);
}
function ppopup(U,W,H){
 var k=popup('',W,H);var d=k.document;d.write("<html><head><title>Комплексные проекты</title></head><body leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'><a href='javascript:close()' style='display: block' title='Щелкните чтобы закрыть'><img src='"+U+"' width='"+W+"' height='"+H+"' border='0' alt='Щелкните чтобы закрыть'></a></body></html>");d.close();
}
function tpopup(T,W,H){
var k=popup('',W,H);var d=k.document;d.write("<html><head><title>"+W+"x"+H+"</title></head><body bgcolor='#ffffff' leftmargin='0' topmargin='0' marginheight='0' marginwidth='0'>"+T+"</body></html>");d.close();
}
function dpopup(U,W,H){
//if(window.showModalDialog){window.showModalDialog(U, '', "dialogWidth:"+W+"px;dialogHeight:"+H+"px;center:yes;edge:sunken;help:no;resizable:yes;scroll:no;status:no;center:yes");}else{popup(U,W,H)}
popup(U,W,H);
}
function select(point, nomove) { 
	if (!point) return;
	point.onmousemove = new Function("document.selection.empty()");
	if ( !point.length  ){
		point = document.all[point.id]; 
	}
	if ( point.length > 1 ){
		for(var i=0; i<point.length; i++ ){
			if (point[i].className != 'active') {
				point[i].className = 'active';
				//if (window.parent && window.parent.addGeo) window.parent.addGeo(point[i].id.substring(1,point[i].id.length), point[i].innerText);
			}else{
				point[i].className = '';
				//if (window.parent && window.parent.deleteGeo) window.parent.deleteGeo(point[i].id.substring(1,point[i].id.length));
			}

		}
	} else {
		if (point.className != 'active') {
			point.className = 'active';
			//if (window.parent && window.parent.addGeo) window.parent.addGeo(point.id.substring(1,point.id.length), point.innerText);
		} else {
			point.className = '';
			//if (window.parent && window.parent.deleteGeo) window.parent.deleteGeo(point.id.substring(1,point.id.length));
		}
	}
}

