// retrieve content from pages with xmlHttpRequest
// file = the file to parse
// element = the id of the element to place the result inside
var content= '';
function getPage(file, element){
	// clear the fetching variable
	var xmlhttp=false; 
	try {
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object.
	} catch (e) {
		try {
			xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); // try the second kind of active x object
		} catch (E) {
			xmlhttp = false;
		}
	}
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest(); // if we were able to get a working active x object, start an XMLHttpRequest
	}
	// open the file through GET
	xmlhttp.open('GET', file, true); 
	xmlhttp.onreadystatechange=function() {
		// check if it is ready to receive data
		if (xmlhttp.readyState==4) { 
			// get the date retrieve
			content = xmlhttp.responseText; 
			if(content){ // check if there is something in the content variable
				// clear the inner content of the element
				document.getElementById(element).innerHTML = ""; 
				// change the inner content of the element
				document.getElementById(element).innerHTML = content; 
			}
		}
	}
	// reset the XMLHttpRequest
    xmlhttp.send(null) 
	return; 
}


function MM_showHideLayers2() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers2.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}




// dreamweaver generic functions
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}



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() 
{
	
	document.getElementById('fogall').style.height = document.body.parentNode.scrollHeight+'px';
	document.getElementById('fogall').style.display = 'block';
	document.getElementById('promo').style.display = 'block';	
	//setHeight();	
}



function hideIframe() 
{
	parent.document.getElementById('fogall').style.display='none';
	parent.document.getElementById('promo').style.display='none';			
}	




function showVivid() 
{
	
	document.getElementById('fogall').style.height = document.body.parentNode.scrollHeight+'px';
	document.getElementById('fogall').style.display = 'block';
	document.getElementById('vivid').style.display = 'block';	
	//setHeight();	
}



function hideVivid() 
{
	parent.document.getElementById('fogall').style.display='none';
	parent.document.getElementById('vivid').style.display='none';			
}


function showClubTera() 
{
	
	document.getElementById('fogall').style.height = document.body.parentNode.scrollHeight+'px';
	document.getElementById('fogall').style.display = 'block';
	document.getElementById('clubtera').style.display = 'block';	
	//setHeight();	
}



function hideClubTera() 
{
	parent.document.getElementById('fogall').style.display='none';
	parent.document.getElementById('clubtera').style.display='none';			
}




function showPornaccess() 
{
	
	document.getElementById('fogall').style.height = document.body.parentNode.scrollHeight+'px';
	document.getElementById('fogall').style.display = 'block';
	document.getElementById('pornaccess').style.display = 'block';	
	//setHeight();	
}



function hidePornaccess() 
{
	parent.document.getElementById('fogall').style.display='none';
	parent.document.getElementById('pornaccess').style.display='none';			
}