// Created: 2004-03-24
// Author Algirdas Noreika
// e-mail: alnor@delfi.lt

//-----------------------------------------------------------------------
// fnAddBookmark() - Adds a bookmark.
function fnAddBookmark(title,url){ 
	if (document.all) window.external.AddFavorite(url,title); 
}


//-----------------------------------------------------------------------
// fnZoomImage()
function fnZoomImage(sImage) {
	oDiv = document.getElementById('idPOPUP');
	
	if (oDiv != null) window.document.body.removeChild(oDiv);
	
		oDiv = window.document.createElement("DIV");
		oDiv.style.position="absolute";
		oDiv.style.visibility = "visible";
		oDiv.style.padding = "1px";
		oDiv.style.width = "0px";
		oDiv.style.height = "0px";
		oDiv.style.border = "0px";
		oDiv.style.left = 4;
		oDiv.style.top = window.document.body.scrollTop+4;
		
		oDiv.id = "idPOPUP";
		
		oDiv.innerHTML = "<table style=\"background-color:#DADADA;width:100%;height:100%;border:1px solid #505050\" cellspacing=\"0\">"+
		"<tr><td style=\"padding:1px;height:1px;border-bottom:1px solid #505050;\">"+
		"	<b style=\"color:#000000;font:normal bold 12px Verdana \">Zooming. Please wait...</b>"+
		"</td>"+
		"<td align=\"right\" valign=\"top\" style=\"border-bottom:1px solid #505050;\">"+
		"<table height=\"1px\" width=\"1px\" cellspacing=\"1\" onclick=\"oDiv = document.getElementById('idPOPUP'); window.document.body.removeChild(oDiv);\"><tr><td style=\"padding:2px;background-color:#BBBBBB;border:1px solid #939393;font:11px Verdana;color:#000000;\" onmouseover=\"this.style.cursor='default';\"><b>X</b></td></tr></table>"+
		"</td>"+
		"</tr>"+
		"<tr>"+
		"	<td colspan=\"2\" style=\"background-color:#EFEFEF;padding:1px 1px 1px 1px\" align=\"left\" valign=\"top\">"+
		"		<img src=\""+sImage+"\"></td>"+
		"</tr>"+
		"</table>";
		window.document.body.appendChild(oDiv);
}


//-----------------------------------------------------------------------
// fnZoomImage2()
function fnZoomImage2(sBasePath, sImage) {
	oDiv = document.getElementById('idPOPUP');
	
	if (oDiv != null) window.document.body.removeChild(oDiv);
	
		oDiv = window.document.createElement("DIV");
		oDiv.style.position="absolute";
		oDiv.style.visibility = "visible";
		oDiv.style.padding = "1px";
		oDiv.style.width = "0px";
		oDiv.style.height = "0px";
		oDiv.style.border = "0px";
		oDiv.style.left = 4;
		oDiv.style.top = window.document.body.scrollTop+4;
		
		oDiv.id = "idPOPUP";
		
		oDiv.innerHTML = "<table style=\"background-color:#DADADA;width:100%;height:100%;border:1px solid #505050\" cellspacing=\"0\">"+
		"<tr><td style=\"padding:1px;height:1px;border-bottom:1px solid #505050;\">"+
		"	<b style=\"color:#000000;font:normal bold 12px Verdana \">Zooming. Please wait...</b>"+
		"</td>"+
		"<td align=\"right\" valign=\"top\" style=\"border-bottom:1px solid #505050;\">"+
		"<table height=\"1px\" width=\"1px\" cellspacing=\"1\" onclick=\"oDiv = document.getElementById('idPOPUP'); window.document.body.removeChild(oDiv);\"><tr><td style=\"padding:2px;background-color:#BBBBBB;border:1px solid #939393;font:11px Verdana;color:#000000;\" onmouseover=\"this.style.cursor='default';\"><b>X</b></td></tr></table>"+
		"</td>"+
		"</tr>"+
		"<tr>"+
		"	<td colspan=\"2\" style=\"background-color:#EFEFEF;padding:1px 1px 1px 1px\" align=\"left\" valign=\"top\">"+
		"		<img src=\""+sBasePath+"fclasses/fresizeimg500.prf?ifname=../"+sImage+"\"></td>"+
		"</tr>"+
		"<tr class=\"CText2\"><td align=\"left\">&#160;<a class=\"cLink\" href=\"" + sBasePath + sImage + "\"target=\"blank\">Download Full Size (Right click this link, then: Save As...)</a></td></tr>"+
		"</table>";
		window.document.body.appendChild(oDiv);
}

//-----------------------------------------------------------------------
// Opens comments window.
function fnComments(nTID) {
	window.open('../fcomments/comments-' + nTID + '.html', '', 'menubar=0,status=0,toolbar=0,resizable=1,scrollbars=1,width=430', true);
}