/* <![CDATA[ */

function popupBlogPhotos() { 
	if(!document.getElementsByTagName) return; 
	var as = document.getElementsByTagName("a"); 
	for (var i = 0; i < as.length; i++) { 
		var a = as[i]; 
		var ri = a.getAttribute("rel"); 
		if (!ri)
			ri = "";
		var rs = ri.split("|"); 
		if(rs[0] == "blogphoto") { 
			scrX = Math.floor((screen.availWidth - 700) / 2);
			scrY = Math.floor((screen.availHeight - 700) / 2); 
			var wa = "width=" + 700 + ",height=" + 700 + ",left=" + scrX + ",top=" + scrY + ",location=no,resizable=yes,scrollbars=no,directories=no,status=no,toolbar=no,menubar=no,copyhistory=no";
			a.setAttribute("href", "javascript:blogShowPhoto('" + htmlBase + "public/blog/popup.aspx?id=" + rs[1] + "&category=" + rs[2] + "&lang=" + rs[3] + "','Popup','" + wa + "'," + 700 + "," + 700 + ");");
		}
	}
}

function blogShowPhoto(link,title,attribs,wi,he) {
	var w;
	w = window.open(link,title,attribs);
	if (w) {
	    if (w.focus) w.focus();
	}
}

onLoadChain += "popupBlogPhotos();"

/* ]]> */
