function pics(img,ref)
{
	document.getElementById(img).src = ref;
}

function openwin(img,w,h,title)
{
 var hWnd;
 if(hWnd!=null) hWnd.close();
 hWnd=window.open(img,"","toolbar=no,location=no,directories=no,resizable=yes,scrollbars=yes,left=100,top=100,width="+w+",height="+h);
 hWnd.document.open();
 hWnd.document.write("<html><head><title>"+title+"</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
 hWnd.document.write("<img src=\""+img+"\" width="+w+" height="+h+">");
 hWnd.document.write("</body></html>");
 hWnd.document.close();
}

function IEPngFix( pngimg, gifimg, width, height, unique_name )
{
	var code = '<img src="'+ gifimg +'" width="' + width + '" height="' + height + '" border="0" id="'+ unique_name +'" style="background:url('+pngimg+') no-repeat 0px 0px;" alt="'+unique_name+'"/>';
	if( navigator.userAgent.indexOf("Opera") > 1 ) document.write(code);
	else
		if( navigator.userAgent.indexOf("MSIE 6") > 1 ) document.write('<img src="'+gifimg+'" width="' + width + '" height="' + height + '" border="0" alt="'+unique_name+'" id="'+ unique_name +'" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src=' + pngimg + ' , sizingMethod=crop );"/>');
		else
			if(navigator.userAgent.indexOf("MSIE 5") != -1) document.write(code);
			else document.write(code);
}



function get_window_height()
{
	var y;
	if (self.innerHeight) {// общий синтаксис
		y = self.innerHeight;	
	} else if (document.documentElement && document.documentElement.clientHeight) {// IE 6 Strict Mode
		y = document.documentElement.clientHeight;	
	} else if (document.body) {// Остальные версии IE
		y = document.body.clientHeight;
	}
	return y;
}

function get_window_width()
{
	var x;
	if (self.innerHeight) {// общий синтаксис
		x = self.innerWidth;
	} else if (document.documentElement && document.documentElement.clientHeight) {// IE 6 Strict Mode
		x = document.documentElement.clientWidth;
	} else if (document.body) {// Остальные версии IE
		x = document.body.clientWidth;
	}
	return x;
}

function set_right_col(id)
{
	col = document.getElementById(id);
	ww = get_window_width();
	if(col)
	{
		if(ww < 1000 ) col.style.width = 0;
		else
		{
			col.style.width = (ww - 1000) * 0.90;
		}
		if(col.style.width > "280px") col.style.width = 280;
	}
}

/* --- /bg */
