function hideElement(e) {
	if ( document.getElementById(e) ){
		document.getElementById(e).style.display = "none";
		}
}

function showElement(e) {
	if ( document.getElementById(e) ){
		document.getElementById(e).style.display = "";
		}
}

function colorize( e, colorized, type, c1, c2) {
	if ( document.getElementById(e) ) {
		obj = document.getElementById(e);
		switch ( type ) {
			case 'form' :
				obj.style.borderColor = !colorized ? c1 : c2;
				break;
		}
	}
}

function elementValidator(element,elementWB,isValid,type,c1,c2) {
	if ( isValid )
		hideElement(elementWB);
	else
		showElement(elementWB);
	colorize(element,isValid,type,c1,c2);
	return isValid;
}

function showLightBox(htmlStr) {
	myLightbox.showData(htmlStr,false,false);
	myLightbox.start(this);
	myLightbox.centerLightbox();
}

function hideLightBox() {
	myLightbox.end(this);
}


function isEmail(str){
		filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(str))		{
			return true;
		}
		else return false;	
}
