function showimg(u,wd,hg){
    s = window.open('','Pic','toolbar=no,location=no,directoties=no,status=no,scrollbars=no,menubar=no,resizable=yes,top=50,left=120,width='+(wd+16)+',height='+(hg+16));
    s.document.open();
    s.document.writeln('<html><head><title>Фонд Мира</title></head><body bgcolor=ffffff onload="window.self.focus();return true;" leftMargin="0" topMargin="0" marginheight=0 marginwidth=0><table cellcpacing=0 cellpadding=5 border=0 width=100% height=100%><tr><td align=center><a href=javascript:window.close()><img src=' + u + ' border=0 width=' + wd + ' height="' + hg + '" alt="close"></a></td></tr></table></body></html>');
    s.document.close();
    s.focus();
	}

function showimg2(u,wd,hg) {
    s = window.open('','Pic','toolbar=no,location=no,directoties=no,status=no,scrollbars=yes,menubar=no,resizable=yes,top=50,left=120,width='+(wd+30)+',height='+(hg+30));
    s.document.open();
    s.document.writeln('<html><head><title>Фонд Мира</title></head><body bgcolor=ffffff onload="window.self.focus();return true;" leftMargin="0" topMargin="0" marginheight=0 marginwidth=0><table cellcpacing=0 cellpadding=5 border=0 width=100% height=100%><tr><td align=center><a href=javascript:window.close()><img src=' + u + ' border=0 width=' + wd + ' height="' + hg + '" alt="close"></a></td></tr></table></body></html>');
    s.document.close();
    s.focus();
	}

function viewimage(page,id,wd,hg){
    s = window.open('','Pic','toolbar=no,location=no,directoties=no,status=no,scrollbars=no,menubar=no,resizable=yes,top=50,left=120,width='+(wd+16)+',height='+(hg+16));
    s.document.open();
    s.document.writeln('<html><head><title>Фонд Мира</title></head><body bgcolor=ffffff onload="window.self.focus();return true;" leftMargin="0" topMargin="0" marginheight=0 marginwidth=0><table cellcpacing=0 cellpadding=5 border=0 width=100% height=100%><tr><td align=center><a href=javascript:window.close()><img src="/includes/viewimage.php?page=' + page + '&id=' + id + '&tmb=no" border=0 width=' + wd + ' height="' + hg + '" alt="close"></a></td></tr></table></body></html>');
    s.document.close();
    s.focus();
	}
	
function showWin(adr,w,h,top,left) {
	str = "top=" + top + ",left=" + left + ",scrollbars=0,resizable=no,status=0,width=" + w + ",height=" + h;
	window.open(adr,'',str);
	}

function get_clientHeight() {	
	var client_Height = 0;
	//Non-IE 
	if( typeof( window.innerWidth ) == 'number' ) client_Height = window.innerHeight; 
	//IE 6+ in 'standards compliant mode'
	else if( document.documentElement && document.documentElement.clientHeight  ) client_Height = document.documentElement.clientHeight; 
	//IE 4 compatible 		
	else if( document.body && document.body.clientHeight ) client_Height = document.body.clientHeight; 
	return client_Height;
	}	
	
function get_clientWidth() {	
	var client_Width = 0;
	//Non-IE 
	if( typeof( window.innerWidth ) == 'number' ) client_Width = window.innerWidth; 
	//IE 6+ in 'standards compliant mode'
	else if( document.documentElement && document.documentElement.clientWidth  ) client_Width = document.documentElement.clientWidth; 
	//IE 4 compatible 		
	else if( document.body && document.body.clientWidth ) client_Width = document.body.clientWidth; 
	return client_Width;
	}		
	
function hide_by_id(id) {
	document.getElementById(id).style.visibility="hidden"
	}	

function show_by_id(ev,id,text) {
	MouseX = ev.clientX + document.body.scrollLeft;
	MouseY = ev.clientY + document.body.scrollTop;
	obj = document.getElementById(id);
	if( text != '' ) obj.innerHTML=text;
	obj.style.top = MouseY + 5;
	obj.style.left = MouseX + 15;
	obj.style.visibility = "visible";
	}	
	
function fetch_object(A) {
	if(document.getElementById) {
		return document.getElementById(A)
	}else{
		if(document.all) {
			return document.all[A]
		}else{
			if(document.layers)	{
				return document.layers[A]
			}else{
				return null
			}
		}
	}
}

function fetch_tags(B,A) {
	if(B==null) {
		return new Array()
	}else{
		if(typeof B.getElementsByTagName!="undefined") 	{
			return B.getElementsByTagName(A)
		}else{
			if(B.all&&B.all.tags) {
				return B.all.tags(A)
			}else{
				return new Array()
			}
		}
	}
}

function fetch_tag_count(B,A) {
	return fetch_tags(B,A).length
}




