


//POSITIONS AN OBJECT IN THE CENTER OF THE PAGE; USES PROTOTYPE.JS
function centerInPage(obj){

	visibleWidth = 
        (window.opera) ? document.body.clientWidth || document.documentElement.clientWidth || window.innerWidth
        : document.documentElement.clientWidth || window.innerWidth || document.body.clientWidth;
    visibleHeight = 
        (window.opera) ? document.body.clientHeight || document.documentElement.clientHeight || window.innerHeight
        : document.documentElement.clientHeight || window.innerHeight || document.body.clientHeight;
		
		var dims = $(obj).getDimensions();
		var centeredTop = (visibleHeight-dims.height)/2+'px';
		var centeredLeft = (visibleWidth-dims.width)/2+'px';
		
		if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){  //safari doesn't read img dimensions correctly when an image is set to diplay "none", so images are written out with display "block"
			$(obj).setStyle({top: centeredTop, left: centeredLeft});
		}else{
			$(obj).setStyle({top: centeredTop, left: centeredLeft });
			Effect.Appear(obj, { duration: 0.3 });		
		}

}	



function adjustForHeight(linkObj){

	visibleWidth = 
        (window.opera) ? document.body.clientWidth || document.documentElement.clientWidth || window.innerWidth
        : document.documentElement.clientWidth || window.innerWidth || document.body.clientWidth;
    visibleHeight = 
        (window.opera) ? document.body.clientHeight || document.documentElement.clientHeight || window.innerHeight
        : document.documentElement.clientHeight || window.innerHeight || document.body.clientHeight;
//alert(visibleHeight);

if(visibleHeight > 704)linkObj.href = linkObj.href.replace(/_450/,"_700");
}	


//COLLECTION OF REGULAR EXPRESSIONS USED IN FORM VALIDATION
var valid = new Object();
valid.alphaNumSpace = /^[a-zA-Z0-9\s]*\$/;
valid.isBlank = /^\s*$/;
