function init() {
	//correctPNG();
	return 1;
}

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004
function correctPNG() {
	for(var i=0; i<document.images.length; i++)	{
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
			var strNewHTML = "<span " + imgID + imgClass + imgTitle
			+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}

function hideEmail(name, domain, display) {
	displayed=(typeof(display)=="undefined") ? name+"@"+domain : display 
	document.write('<a href=mailto:' + name + '@' + domain + '>' + displayed + '</a>');
}

function popImage(gallery,image) {
	win = window.open("imageViewer.php?g=" + gallery + "&i=" + image,"ImageViewer","width=810,height=500,scrollbars=yes");
}

function resize() {
	var sh,ph;

	if (self.innerHeight) { // all except Explorer
		sh = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		sh = document.documentElement.clientHeight;
	}
	else if (document.body) { // other Explorers
		sh = document.body.clientHeight;
	}

	var test1 = document.body.scrollHeight;
	var test2 = document.body.offsetHeight
	if (test1 > test2) { // all but Explorer Mac
		ph = document.body.scrollHeight;
	}
	else { // Explorer Mac; would also work in Explorer 6 Strict, Mozilla and Safari
		ph = document.body.offsetHeight;
	}

//	dh = document.getElementById("contentDiv").offsetHeight - window.innerHeight;
//	dh = 80 + document.body.offsetHeight - window.innerHeight;
	dh = ph - sh + 1;

	var dw=0;
/*
	var sw,pw;

	if (self.innerWidth) { // all except Explorer
		sw = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth) { // Explorer 6 Strict Mode
		sw = document.documentElement.clientWidth;
	}
	else if (document.body) { // other Explorers
		sw = document.body.clientWidth;
	}

alert(document.body.scrollHeight);
alert(document.body.offsetHeight);

alert(document.body.scrollWidth);
alert(document.body.offsetWidth);

	if (document.body.scrollWidth > document.body.offsetWidth) { // all but Explorer Mac
		pw = document.body.scrollWidth;
	}
	else { // Explorer Mac; would also work in Explorer 6 Strict, Mozilla and Safari
		pw = document.body.offsetWidth;
	}

	dw = pw - sw + 1;
*/

	window.resizeBy(dw,dh);
}
