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

function ToogleDisp(id){
	var el=document.getElementById(id);
	if(el!==undefined){
		if(el.style.display!='none'){
			el.styles.display='none';
		}else{
			el.styles.display='block';
		}
	}
}

var gAutoPrint = true;
function printFriendly(printReady){
	if (document.getElementById!= null)	{
		var html = '<HTML>\n<HEAD>\n';
		var titlu = '';
		if (document.getElementsByTagName!= null)		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
			titlu = document.getElementsByTagName("title");
			titlu = titlu[0].innerHTML;
		}
		html += '\n</HE' + 'AD>\n<BODY>\n';
		var printPageElem = document.getElementById(printReady);

		if (printPageElem!= null)		{
			html +='\n<div id="body_content">\n';
			html +='<div id="'+printReady+'">\n';
			html +='\n<h1>'+titlu+'</h1>\n';
			html += printPageElem.innerHTML;
//			html.replace("\<h1\>", "\<div class='hh1'\>");
//			html.replace("\</h1\>", "\</div\>");
			html +='\n</div>\n';
		}else{
			alert("We cannot find the printable section.");
			return;
		}

		html += '\n</BO' + 'DY>\n</HT' + 'ML>';

		var printWin = window.open("","printFriendly");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}else{
		alert("This function can be used only \n by browsers supporting JavaScript (active).");
	}
}

