var emailFilter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

function returnObject (id) {
	if (document.all) {
		return document.all[id];
	} else if (document.getElementById) {
		return document.getElementById(id)
	} else if (document.layers) {
		return document.layers[id];
	}
	return null;
}

function showPopUp(url, title, options) {
	return window.open(url, title, options);
}

function documentWidth () {
	if(typeof(window.innerWidth) == 'number') {
		//Non-IE
	    return parseInt(window.innerWidth);
	} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
	    //IE 6+ in 'standards compliant mode'
    	return parseInt(document.documentElement.clientWidth);
	} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
		//IE 4 compatible
		return parseInt(document.body.clientWidth);
	}
	return 0;
}
	
function documentHeight () {
	if(typeof(window.innerWidth) == 'number') {
		//Non-IE
	    return parseInt(window.innerHeight);
	} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
	    //IE 6+ in 'standards compliant mode'
	    return parseInt(document.documentElement.clientHeight);
	} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
		//IE 4 compatible
		return parseInt(document.body.clientHeight);
	}
	return 0;
}
function right(e) {
	if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2))
		return false;
	else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
		alert("All images are Copyrighted by PartySavvy.");
		return false;
	}
	return true;
}

document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;