<!--
// language fenster
var win = null;
var nextContent = null;

function freestyler(){
	h ='570';
	w = '770';
	LeftPosition = (screen.width) ? ((screen.width-w)/2)+70 : 0;
	TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
	settings = 'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,noresizable,toolbar=no,location=no,status=no';
	win = window.open("BJBARRY/FreestylerPop?mycreon=true","freestyler",settings);
	if(win.window.focus){
		win.window.focus();
	}
}
function loadIframe(action) {
 var t = "index.php?mycreon=true&id=" + action;
 if(document.getElementById("loader")!=null){
 	document.getElementById("loader").style.display = 'inline';
 }
 //window.frames['contentFrame'].document.getElementsByTagName('body')[0].style.display = 'none';
 if(window.frames['contentFrame']){
 
		window.frames['contentFrame'].location.href = t;
	}else{
		location.href="?id=" + action;
	}
}

function hideLoader() {
 parent.document.getElementById('loader').style.display = 'none';
}


function popup(id){
		version = navigator.appVersion;
		if (version.toLowerCase().indexOf("mac")!=-1) {
			popup_norm(id);
			return;
		}

		parent.document.getElementById("popupFrame").style.display = 'inline';
		parent.showLightContent(id);
		return;
}

function popup_norm(id){

		h ='570';
		w = '770';
		LeftPosition = (screen.width) ? ((screen.width-w)/2) : 0;
		TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
		settings = 'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',noresizable,toolbar=no,location=no,status=no';
		win = window.open("index.php?id="+ id + "&mycreon=true","pop",settings);
		if(win.window.focus) {
			win.window.focus();
		}
}

function imprint(){

		h ='570';
		w = '770';
		LeftPosition = (screen.width) ? ((screen.width-w)/2) : 0;
		TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
		settings = 'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',noresizable,toolbar=no,location=no,status=no';
		win = window.open("index.php?id="+ 131 + "&mycreon=true","pop",settings);
		if(win.window.focus) {
			win.window.focus();
		}
}

function flyergallery(){

		h ='570';
		w = '770';
		LeftPosition = (screen.width) ? ((screen.width-w)/2) : 0;
		TopPosition = (screen.height) ? ((screen.height-h)/2)+5: 0;
		settings = 'height='+h+',width='+ w+',top='+TopPosition+',left='+LeftPosition+',noresizable,toolbar=no,location=no,status=no';
		win = window.open("index.php?id="+ 125 + "&mycreon=true","pop",settings);
		if(win.window.focus) {
			win.window.focus();
		}
}

function closer(){
	window.close;
}

function minimizeLightbox() {
	var lb = document.getElementById("lightbox");
	var lbc = document.getElementById("lightbox_controller");

	lb.style.height = '0px';
	if (lb.style.display == 'none') {
   lb.style.display = 'inline';
  }
  if (lbc.style.display == 'none') {
   lbc.style.display = 'inline';
  }
}

function maximizeLightbox() {
	var lb = document.getElementById("lightbox");
	lb.style.width = '100%';
	lb.style.height = '100%';
  if(/MSIE/.test(navigator.userAgent)) {
  	//lb.style.height = document.body.clientHeight;
	lb.style.height = 5000;
  }
  else {
   lb.style.height = '100%';
  }
}

function showLightContent(id) {
  maximizeLightbox();
  nextContent = id;
	var lb = document.getElementById('lightbox');
	new Effect.Opacity("lightbox", {duration: 3,from:0, to:0.90, afterFinish:loadContent});
	//new Effect.Morph('lightbox', {style:{height:'100%'}, duration:2});
	document.getElementById("popupFrame").src = "?mycreon=true&id=" + id;
}

function hideLightContent(sec,start) {
	if(!sec) sec = 2;
	if(!start) start = 0.9;
 document.getElementById("popupFrame").setAttribute("height", 0);
 var lb = document.getElementById('lightbox');
 new Effect.Opacity("lightbox", {duration: sec,from:0.9, to:0, afterFinish:minimizeLightbox});
 //new Effect.Morph('lightbox', {style:{height:'0px'}, duration:2});

}

function loadContent() {
  var iFrame = document.getElementById("popupFrame");
  var left;
  if(/MSIE/.test(navigator.userAgent)) {
  	left = document.body.clientWidth/2-iFrame.getAttribute("width")/2;
  }
  else {
   left = window.innerWidth/2-iFrame.getAttribute("width")/2;
  }
  iFrame.style.left = left + "px";
  iFrame.setAttribute("height", 500);
  //var iFrameBody = iFrame.document.getElementsByName("body")[0];
}



function showSite() {
 var lbi = document.getElementById("lightbox_intro");
 lbi.parentNode.removeChild(lbi);
 hideLightContent(6,1);
 var so = new SWFObject("swf/menu.swf", "pelicula", "821", "408", "8", "#ffffff");
 so.addParam("wmode", "transparent");
 so.addParam("menu", "false");
 so.addParam("allowScriptAccess", "sameDomain");
 so.addParam("quality", "high");
 so.write("contenido");
}

function initSite() {
 //IE 6 Fix

 document.getElementsByTagName("body")[0].style.display = 'inline';
 var lb = document.getElementById("lightbox");
 if (/MSIE/.test(navigator.userAgent)) {
 	lb.style.height = document.body.clientHeight+100;

 }

}

function removeLightbox(obj) {
 var lb = document.getElementById(obj);
 lb.parentNode.removeChild(lb);
}


/* test: */


//-->
