function showBigImage( imageSrc )
{
	var pageSrc	= "/view_big_image.php?img=" + imageSrc;
	var bigWin	= window.open( pageSrc,"bigImageWin","width=782,height=522,resizable" );
}

function resizePageToFit( image )
{
	var imgHeight	= image.height;
	var imgWidth	= image.width;
	
	var currHeight	= (window.innerHeight) ? window.innerHeight : document.body.clientHeight;
	var currWidth	= (window.innerWidth) ? window.innerWidth : document.body.clientWidth;
	
	window.resizeBy( imgWidth - currWidth,imgHeight - currHeight );
}

function isBlank (text)
{
	text = chopExtraSpaces (text);
	return !(text.length > 0);
}

function isEmail (text)
{
    return (text.search (/^\w+((-\w+)|(\.\w+))*\@\w+((\.|-)\w+)*\.\w+$/) != -1);
}

function chopLeadingSpaces (text)
{
	return text.replace (/^\s+/, "");
}

function chopTrailingSpaces (text)
{
	return text.replace (/\s+$/, "");
}

function chopExtraSpaces (text)
{
	return chopTrailingSpaces (chopLeadingSpaces (text));
}

function chopAllSpaces (text)
{
	while (text.search (/\s/) >= 0) {text = text.replace (/\s/g, "");}
	return chopTrailingSpaces (chopLeadingSpaces (text));
}

function chopExtraLineBreaks (text)
{
	return text.replace (/(\n\s*){2,}/g, "\n");
}