/*
*	Revista Summa - www.revistasumma.com
*	
*	filename:	/revista-digital/js/main.js
*	info:		Main JS file for Revista Digital
*	
*	developer:	Tony Córdova <tonyrcordova@yahoo.com>
*/

var path = '';

var template = '/revista-incae';

var mail_regexp = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9\-\.])+\.([A-Za-z]{2,4})$/;

function ajax( )
{
	var ajx = false;
	
	try	{	ajx	=	new ActiveXObject("Msxml2.XMLHTTP");	}
	catch(e)
	{
		try {	ajx = new ActiveXObject("Microsoft.XMLHTTP");	}
		catch(E)	{	ajx = false;	}
	}
	if( !ajx && typeof XMLHttpRequest != 'undefined' )
		ajx = new XMLHttpRequest();
	
	return ajx;
}

function addEvent( obj, evType, fn )
{ 
	if (obj.addEventListener)
	{ 
		obj.addEventListener(evType, fn, false); 
		return true; 
	}
	else if (obj.attachEvent)
	{ 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	}
	else
	{
		return false; 
	} 
}


