function view_form(lang){
	var cat = "http://consultas.lletato.cat/default.aspx?idioma=CA";
	var spa = "http://consultas.lletato.cat/default.aspx?idioma=ES";
	var url = "";
	if(lang == "cat"){
		url = cat;
	}
	if(lang == "esp"){
		url = spa;
	}
	if(url != ""){
		$("#contact_form").attr("src",url);
		$("#iframe_container").show();
		$("#gran_blanc_de_fons").show();
		document.getElementById("flashMovie").jsShowWhiteBox();
	}
}
function close_form(){
	$("#iframe_container").hide();
	$("#contact_form").attr("src","");
	document.getElementById("flashMovie").jsHideWhiteBoxx();
}

//--------------------------------------------------------------------------
// General
//--------------------------------------------------------------------------
function helloWorld(var1,var2){
	//alert ("Hello World! "+var1+","+var2)
	return (var1+" "+var2);
}
function getFlashMovie(movieName) {
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}
//--------------------------------------------------------------------------
// Init Page
//--------------------------------------------------------------------------
function initPage(scrollY,scrollH){
	
	setFlashHeight(scrollH)//1850
	setScrollY(scrollY)//0
}
//--------------------------------------------------------------------------
// Flash Height 
//--------------------------------------------------------------------------
function setFlashHeight(h){
	//alert(h+" "+pageHeight);
	//if(h<pageHeight()){
		//h=pageHeight();
	//}
	document.documentElement.style.height=h+"px";
	document.body.style.height=h+"px";
}
function getFlashHeight(){
	return(document.documentElement.style.height);
}
//--------------------------------------------------------------------------
// Scroll Y 
//--------------------------------------------------------------------------
function getScrollY(){
	return document.documentElement.scrollTop;
}
function setScrollY(y){
	document.documentElement.scrollTop=y;
}
function updateScroll(){
	//getFlashMovie("flashMovie").updateScroll(getScrollY());
}
//--------------------------------------------------------------------------
// Browser Window Size and Position
//--------------------------------------------------------------------------
function pageWidth() {return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;} 

function pageHeight() {return  window.innerHeight != null? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null? document.body.clientHeight : null;} 

function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset :document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0;} 

function posTop() {return typeof window.pageYOffset != 'undefined' ?  window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0;} function posRight() {return posLeft()+pageWidth();} function posBottom() {return posTop()+pageHeight();}
                    
//--------------------------------------------------------------------------


