/* Show members login page */
function getHeight() {
	return (window.frames['monIframe'].returnHeight())+20;	
}

function setHeight() {
	var docHeight=getHeight();
	document.getElementById('monIframe').style.height = docHeight+'px';
	document.getElementById('iframe').style.height = docHeight+'px';
}

function showIframe() 
{
	$('#fogall').click(hideIframe);
	document.getElementById('fogall').style.height = document.body.parentNode.scrollHeight+'px';
	document.getElementById('fogall').style.display = 'block';
	document.getElementById('iframe').style.display = 'block';	
	setHeight();	
}

function hideIframe() 
{
	parent.document.getElementById('fogall').style.display='none';
	parent.document.getElementById('iframe').style.display='none';			
}


function pop_free(link) {
	var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
	
	mywindow = window.open(link,"mywindow","location=0,status=0,scrollbars=1,toolbar=0,width=770,height=835");
	if(!is_chrome) {
		var int_windowLeft = (screen.width - 770) / 2;
		var int_windowTop = (screen.height - 835) / 2;
		mywindow.moveTo(int_windowLeft,int_windowTop);
	}
}

function hide_warning(url_tracking){
	$('#body_warning').fadeOut();
	$('#main_warning').fadeOut();
	$.getScript(url_tracking);
}

function adjust_warning() {
	document.getElementById('body_warning').style.height = document.body.parentNode.scrollHeight+'px';
}

function menu_display(pMenuShow, arrMenuHide, pLink) {
	for(u=0; u<arrMenuHide.length; u++){
		var m = arrMenuHide[u];
		if(pMenuShow == m){
			document.getElementById(m).style.display = 'block'; 
		}
		else {
			document.getElementById(m).style.display = 'none';
		}
	}

	var p=null;
	var l=pLink
	while(p==null){
		l = l.parentNode;
		p = l.getElementsByTagName('li');
		if(p.length==0){
			p=null;	
		}
	}

	for(var i=0; i<p.length; i++){
		p.item(i).childNodes[0].className = '';
	}
	
	pLink.className = 'current';
}

function nextFrame(id, frame){
	//preloadFrames(id);
	document.getElementById(id).src = frames_ss[id][frame];
	var n = (frame < frames_ss[id].length-1 ) ? frame+1 : 0;
	frame_timer = setTimeout("nextFrame('"+id+"', "+n+")", 700);
}

function stopFrame(){
	clearTimeout(frame_timer);
}

