<!--
var mailRegex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

function showLogin()
{
	var windowLogin = new jsWindow(FULL_BASE_URL + '/grupo/login', {
							   width: 400, 
							   height: 220, 
							   blockBackground: true,
							   identifier: 'loginFloater',
							   title: 'Grupo TVCABLE - Login',
							   positionX:'right',
							   positionY:'top',
							   onClose: function(){ activateFlash();}
							   });
	deactivateFlash();	
}

function showRequeriments()
{
	var windowReqs = new jsWindow(URL_BASE + '/productos/requerimientos', {
							   width: 400, 
							   height: 440, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'CABLEMODEM - Requerimientos',
							   positionX:'center',
							   positionY:'middle'
							   });
}


function showContractPopup(contrato, ciudad, negocio)
{
	contractPopup = new jsWindow(FULL_BASE_URL + '/grupo/preferencias/agregar_contrato/' + contrato + '/' + ciudad + '/' + negocio + '/1', {
							   width: 520, 
							   height: 170, 
							   blockBackground: true,
							   identifier: 'contractPopupFloater',
							   title: 'Grupo TVCABLE - Agregar Contrato',
							   positionX:'center',
							   positionY:'middle',
							   onClose: function(){ activateFlash();}
							   });
	deactivateFlash();	
}

function closeLogin()
{
	windowLogin.closeWindow();
}

function deactivateFlash()
{
	try{Element.show('img_main');}catch(e){};
	try{Element.hide('fla_main');}catch(e){};
}

function activateFlash()
{
	try{Element.hide('img_main');}catch(e){};
	try{Element.show('fla_main');}catch(e){};
}

function setCalendar( inputField, trigger)
{
	Calendar.setup(
	{
		inputField : inputField,
		ifFormat : "%Y-%m-%d",
		button : trigger
	}
	);
}


function setHome()
{
	document.body.style.behavior='url(#default#homepage)';
	document.body.setHomePage(FULL_PORTAL_URL);
}

function blindUpDown(element, buttonId)
{
	var button = $('buttonId');
	Effect.toggle(element, 'blind');
	Element.toggleClassName(button,'close');
}

function productShowNext()
{
	new Effect.Fade('PreviousPage', { 	duration: 1, 
										beforeFinish: function()
											{
												new Effect.Appear('NextPage', {duration:1});
											}
									});
}

function productShowPrevious()
{
	new Effect.Fade('NextPage', { 	duration: 1,
									beforeFinish: function()
											{
												new Effect.Appear('PreviousPage', {duration:1});
											}
									});
}

function validate_emails(forma)
{	
	var forma = $(forma);
	var fields = forma.getElementsByClassName('email_field');
	var response = true;
	fields = $A(fields);
	
	fields.each(function(field)
	{
		var value = field.value;
		
		if( !value.blank() && field.disabled == false )
		{
			if( !value.match(mailRegex))
			{
				response = false;
			}
		}
	});
	
	return response;
}

function validate_dates(forma)
{	
	var forma = $(forma);
	var fields = forma.getElementsByClassName('date_field');
	var response = true;
	fields = $A(fields);
	
	fields.each(function(field)
	{
		var value = field.value;
		
		if( !value.blank() )
		{
			if( value != '0000-00-00' )
			{
				if( !value.match(dateRegex))
				{
					response = false;
				}
			}
		}
	});
	
	return response;
}

function setCalendar( inputField, trigger)
{
	Calendar.setup(
	{
		inputField : inputField,
		ifFormat : "%Y-%m-%d",
		button : trigger
	}
	);
}

function showConditions()
{
	var windowReqs = new jsWindow(URL_BASE + '/productos/condiciones', {
							   width: 480, 
							   height: 730, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Condiciones',
							   positionX:'right',
							   positionY:'middle'
							   });
}


function showConditionsWifi()
{
	var windowReqs = new jsWindow(URL_BASE + '/wifi/condiciones', {
							   width: 480, 
							   height: 500, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Condiciones',
							   positionX:'center',
							   positionY:'middle'
							   });
}

function showRequerimentsWIfi()
{
	var windowReqs = new jsWindow(URL_BASE + '/wifi/requerimientos', {
							   width: 400, 
							   height: 200, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'CABLEMODEM - Requerimientos',
							   positionX:'center',
							   positionY:'middle'
							   });
}


function showHardwareWIfi()
{
	var windowReqs = new jsWindow(URL_BASE + '/wifi/hardware', {
							   width: 500, 
							   height: 550, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Hardware',
							   positionX:'center',
							   positionY:'middle'
							   });
}


function showSoftwareWIfi()
{
	var windowReqs = new jsWindow(URL_BASE + '/wifi/software', {
							   width: 500, 
							   height: 560, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Wireless',
							   positionX:'center',
							   positionY:'middle'
							   });
}


function showOficinasWIfi()
{
	var windowReqs = new jsWindow(URL_BASE + '/wifi/oficinas', {
							   width: 500, 
							   height: 500, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Oficinas',
							   positionX:'center',
							   positionY:'middle'
							   });
}

function showWizardWiFi()
{
	window.open("http://www.trendnet.com/emulators/TEW-652BRP_v2.0R/wizard.html","","width=520,height=360,scrollbars=0.location=0,resizable=0,status=0,toolbar=0");
}

function GTVC_FLASH_DoFSCommand(command, args)
{
	//var myFlashObj = InternetExplorer ? GTVC_FLASH : document.GTVC_FLASH;
	if (command == "close_ad_tvc") 
	{ 
		Element.hide('div_gtvc_flash');	
	}
}

-->