//
//
// functions for showing and hiding divs
//
function getRefToDiv(div_ID) {
	if( document.layers ) {
		//Netscape layers
		return document.layers[div_ID];
	}
	if( document.getElementById ) {
		//DOM; IE5, NS6, Mozilla, Opera
		return document.getElementById(div_ID);
	}
	if( document.all ) {
		//Proprietary DOM; IE4
		return document.all[div_ID];
	}
	if( document[div_ID] ) {
		//Netscape alternative
		return document[div_ID];
	}
	return false;
}
function showDiv(divID, action) {
	myReference = getRefToDiv(divID);
	if( !myReference ) {
		window.alert('Nada funciona en este navegador! Por qué no instalas Firefox?');
		return; //don't go any further
	}
	//now we have a reference to it
	if( myReference.style ) {
		//DOM & proprietary DOM
		if (action)
			myReference.style.display = 'block';
		else 
			myReference.style.display = 'none';
	} else {
		//layers syntax
		if (action)
			myReference.display = 'block';
		else 
			myReference.display = 'none';
	}
}
function swapImg(imgId, newImg) {
	myReference = getRefToDiv(imgId);
	if( !myReference ) {
		window.alert('Nada funciona en este navegador! Por qué no instalas Firefox?');
		return; //don't go any further
	}
	//now we have a reference to it
	myReference.src = newImg;
}
//
//forms validator  
// Checks to see if form element is empty
function isEmpty( str) {
    strRE = new RegExp( );
    strRE.compile( '^[s ]*$', 'gi' );
    return strRE.test( str.value );
}
// Checks to see if email address is 'valid'
function notValidEmail( str ) {
    mailRE = new RegExp( );
    mailRE.compile( '^[._a-z0-9-]+@[.a-z0-9-]+[.]{1}[a-z]{2,4}$', 'gi' );
    return !(mailRE.test( str.value ));
}
//

