    function addToFav(){

		title = window.document.title;
		url = window.document.location;

//    	if (window.sidebar)
//    		window.sidebar.addPanel(title, url, "");
//    	else if(window.opera && window.print){
//    		var elem = document.createElement('a');
//    		elem.setAttribute('href',url);
//    		elem.setAttribute('title',title);
//    		elem.setAttribute('rel','sidebar');
//    		elem.click();
//    	} else if(document.all)
			window.external.AddFavorite (window.document.location, window.document.title);
    
    }

// Размер изображения на Descript
function img_change(img)
{
	d = img.height/img.width;
	img.width = 600;
	img.height = img.width*d;
}

function centerPopUp( url, name, width, height, scrollbars ) { 
 
	if( scrollbars == null ) scrollbars = "0" 
 
	str  = ""; 
	str += "resizable=1,"; 
	str += "scrollbars=" + scrollbars + ","; 
	str += "width=" + width + ","; 
	str += "height=" + height + ","; 
 
	if ( window.screen ) { 
		var ah = screen.availHeight - 30; 
		var aw = screen.availWidth - 10; 
 
		var xc = ( aw - width ) / 2; 
		var yc = ( ah - height ) / 2; 
 
		str += ",left=" + xc + ",screenX=" + xc; 
		str += ",top=" + yc + ",screenY=" + yc; 
	} 
	window.open( url, name, str ); 
} 


function confirm_error_link(wid, ids)
{
	var mess = "clean.php?content=wares&page=message&ware_id="+wid+"&ids="+ids;

	if (confirm("Ссылка на программу и зеркало не работают?"))
		centerPopUp( mess, "popup", 750, 280 );
}
