
function showChannel(id, city)
{
	windowLogin = new jsWindow(FULL_BASE_URL + '/tvcable/channel/index/'+id+'/'+city, {
							   width: 490, 
							   height: 450, 
							   blockBackground: true,
							   identifier: 'loginFloater',
							   title: 'TVCABLE - M&aacute;s en tu TV',
							   positionX:'center',
							   positionY:'middle',
							   onClose: function(){ activateFlash();}
							   });
	deactivateFlash();	
}


function showLogin()
{
	windowLogin = new jsWindow(FULL_BASE_URL + '/grupo/login', {
							   width: 410, 
							   height: 220, 
							   blockBackground: true,
							   identifier: 'loginFloater',
							   title: 'Grupo TVCABLE - Login',
							   positionX:'right',
							   positionY:'top',
							   onClose: function(){ activateFlash();}
							   });
	deactivateFlash();	
}


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()
{
	parent.windowLogin.closeWindow();
}

function deactivateFlash()
{
	try{Element.show('img_main');}catch(e){};
	try{Element.hide('fla_main');}catch(e){};
	try{deactiveContentFlash();}catch(e){};
}

function activateFlash()
{
	try{Element.hide('img_main');}catch(e){};
	try{Element.show('fla_main');}catch(e){};
	try{activeContentFlash();}catch(e){};
}

function activeContentFlash()
{
	try{hideFlashClass('tvc_static_flash');}catch(e){};
	try{showFlashClass('tvc_dinamic_flash');}catch(e){};
}

function deactiveContentFlash()
{
	try{hideFlashClass('tvc_dinamic_flash');}catch(e){};
	try{showFlashClass('tvc_static_flash');}catch(e){};	
}

function hideFlashClass(className)
{
	var divArray = $$('.' + className);
	var flash_div;
	for(var i = 0; i < divArray.length; i++)
	{
		flash_div = divArray[i];
		Element.hide(flash_div);
	}
}

function showFlashClass(className)
{
	var divArray = $$('.' + className);
	var flash_div;
	for(var i = 0; i < divArray.length; i++)
	{
		flash_div = divArray[i];
		Element.show(flash_div);
	}
}

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 activateLink(element)
{
	var container = $('family_nav');
	var child = container.firstChild;
	while (child)
	{
		if( child.nodeType == 1)
		{
			Element.removeClassName(child,'active');
		}
		child = child.nextSibling;
	}
	Element.addClassName(element,'active');
}

function hideControlFlash()
{
	try{Element.show('control_img');}catch(e){};
	try{Element.hide('control_fla');}catch(e){};	
}

function showControlFlash()
{
	try{Element.hide('control_img');}catch(e){};
	try{Element.show('control_fla');}catch(e){};	
}

function showDestacados()
{
	window.open("http://www.grupotvcable.com.ec/tvcable/destacados/boletin/2010-12-31/2011-01-02","","width=720,height=500,scrollbars=1,location=0,resizable=0,status=0,toolbar=0");
}

function showPromobeneficios()
{
	var windowReqs = new jsWindow(URL_BASE + '/promociones/promobeneficios', {
							   width: 480, 
							   height: 360, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Beneficios',
							   positionX:'center',
							   positionY:'middle'
							   });
}


function showPromocondiciones()
{
	var windowReqs = new jsWindow(URL_BASE + '/promociones/promocondiciones', {
							   width: 480, 
							   height: 500, 
							   blockBackground: false,
							   identifier: 'reqFloater',
							   title: 'Condiciones',
							   positionX:'center',
							   positionY:'middle'
							   });
}
-->
