function langue(langue_choisie){
	helper_frame.location.href="langue.php?langue="+langue_choisie
	}
	


function bookmark(url, title) {
	url="http://www.muscatmeetings.com"
	title="MUSCAT - Les 3èmes Rencontres Méditerranéennes du Muscat - Du 31 janvier au 2 février 2009 / Palais des Congrès de Perpignan"
	
    if ( window.external && typeof(window.sidebar) == 'undefined') {
        window.external.AddFavorite(url,title);
    } else if ( window.sidebar.addPanel ) {
        window.sidebar.addPanel(title,url,"");
    }
}


function valider_form_call_back(){
	// verif des champs obligatoires
	if(document.getElementById("nom").value!="" &&
		 document.getElementById("email").value!="" &&
		 document.getElementById("tel").value!="" &&
		 document.getElementById("raison_sociale").value!="" &&
		 document.getElementById("activite").value!=""
		 ){
		document.form.action="call_back_send.php?type="+document.getElementById("activite").value
		document.form.submit();
		}else{alert("Vous devez renseigner tous les champs obligatoires !")}
	}
	

function fixbug(){
	theObjects = document.getElementsByTagName("object"); 
	for(var i=0; i<theObjects.length;i++){theObjects[i].outerHTML = theObjects[i].outerHTML;}
}

// ajoute un footer en bas de page
function footer(){
	
	if (window.sidebar){decalage=746}else{decalage=746}
	document.getElementById("footing").innerHTML="<div id='footer' style='position:absolute; left:1px; top:"+(findPosY("adlogo")+130)+"; width:744px;height:1px; z-index:99;background-color:#601f05;'></div>"
	document.getElementById("fondglobal").style.height=(findPosY("adlogo")+130)
	}
	
	
// init analyse navigateur
function initDHTMLAPI() { 
    if (document.images) {
        isCSS = (document.body && document.body.style) ? true : false;
        isW3C = (isCSS && document.getElementById) ? true : false;
        isIE4 = (isCSS && document.all) ? true : false;
        isNN4 = (document.layers) ? true : false;
        isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
	    }
	}



// Convert object name string or object reference into a valid element object reference
function getRawObject(obj) {
    var theObj;
    if (typeof obj == "string") {
        if(isW3C){theObj = document.getElementById(obj);
			}else if(isIE4){
				theObj = document.all(obj);
					}else if(isNN4){theObj = seekLayer(document, obj);}
	    }else {theObj = obj;}
    return theObj;
	}


// récupère la position en left
function findPosX(id) { 
		var obj=document.getElementById(id)
		var curleft = 0;
		if (obj.offsetParent) {
			while (obj.offsetParent) {
				curleft += obj.offsetLeft;
				obj = obj.offsetParent;
			}
		} else if (obj.x) {curleft += obj.x;}
		return curleft;
	}


// récupère la position en top
function findPosY(id) { 
	var obj=document.getElementById(id)
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	} else if (obj.y) {curtop += obj.y;}
	return curtop;
}


// récupère la hauteur de l'objet
function getObjectHeight(id){
		var elem = getRawObject(document.getElementById(id));
		var result = 0;
		if (elem.offsetHeight) {result = elem.offsetHeight;
			} else if (elem.clip && elem.clip.height) {
			result = elem.clip.height;
			 }else if (elem.style && elem.style.pixelHeight) {
			result = elem.style.pixelHeight;
		}
		return parseInt(result);
	}


// récupère la largeur de l'objet
function getObjectWidth(id){
		var elem = getRawObject(document.getElementById(id));
		var result = 0;
		if (elem.offsetWidth) {
			result = elem.offsetWidth;
		} else if (elem.clip && elem.clip.width) {
			result = elem.clip.height;
		} else if (elem.style && elem.style.pixelHeight) {
			result = elem.style.pixelHeight;
		}
		return parseInt(result);
	}



// Return the available content width space in browser window
function getInsideWindowWidth() { 
		if (window.innerWidth) {
			return window.innerWidth;
		} else if (isIE6CSS) {
			// measure the html element's clientWidth
			return document.body.parentElement.clientWidth;
		} else if (document.body && document.body.clientWidth) {
			return document.body.clientWidth;
		}
		return 0;
	}



// Return the available content height space in browser window
function getInsideWindowHeight() { 
    if (window.innerHeight) {return window.innerHeight;
	    }else if (isIE6CSS) {
        // measure the html element's clientHeight
        return document.body.parentElement.clientHeight;
   	 }else if (document.body && document.body.clientHeight) {
		 return document.body.clientHeight;
	    }
    return 0;
	}
	
	
initDHTMLAPI();
