/*****
Powered by GCNMediacorp.com
*****/
function gcn_page (page) {
	switch (page) {
		case 'web':
			document.location.href = "http://"+document.location.host+"/en/";
		break;
		case 'home': text = 'Home:'; break;
		case 'sinopsis': text = 'Sinopsis:'; break;
		case 'tecnicos': text = 'Tecnicos:'; break;
		case 'reparto': text = 'Reparto:'; break;
		case 'trailer': text = 'Trailer:'; break;
		case 'prensa': text = 'Prensa:'; break;
		case 'fotos': text = 'Fotos:'; break;
		case 'descargas': text = 'Descargas:'; break;
		case 'comentarios': text = 'Comentarios:'; break;
		case 'contacto': text = 'Contacto:'; break;
	}
	gcn_status_start(text);
	$.ajax({
		type: "POST",
		url: "views/view_"+page+".php",
		data: $('#form_contact_company').serialize(),
		success: function(data) {
			$('#contenido').html(data);
			gcn_status_stop();
		}
	});
}
function isEmailAddress (s) {
	var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
	if (s.length == 0 ) return true;
	if (filter.test(s)) {
		return true;
	}
	return false;
}
function msg (objId, type, txt) {
	$(objId).hide();
	if (type != 'empty') {
		$(objId).attr('class', type);
		$(objId).html(txt);
		$(objId).fadeIn('slow');
	}
}
function msg_form (objId, type, txt) {
	objId = objId+'_msg';
	msg (objId, type, txt);
}
function gcn_status_start (text) {
	if (text.length == 0) {
		text = 'loading ....';
	} else {
		text = '<img src="images/loading_small.gif" width="16" height="16" /> '+text+' loading ...';
	}
	$('#gcn_status .content').html(text);
	$('#gcn_status').show();
}
function gcn_status_stop () {
	$('#gcn_status').hide();
}
function awards_show () {
	$('a.awards').click();
}