var host = "http://www.plastiquemicron.com/";
var flash;

function showMain() {
	var str = "left=0,screenX=0,top=0,screenY=0,scrollbars=yes,resizable=yes,location=yes,toolbar=yes";

	if (window.screen) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		str += ",height=" + ah;
		str += ",innerHeight=" + ah;
		str += ",width=" + aw;
		str += ",innerWidth=" + aw;
	} else {
		str += ",width=1024,height=768";
	}
	window.open(host+'fr/','Plastique_Micron',str);	
}

function showScroller(wich) {
	if(wich == "width") {
		document.getElementById("flash").style.width = "859px";
	} else {
		document.getElementById("flash").style.height = "649px";
	}
}
function hideScroller(wich) {
	if(wich == "width") {
		document.getElementById("flash").style.width = "100%";
	} else {
		//document.getElementById("flash").style.height = "100%";
		document.getElementById("flash").style.height = $("body").css("height");
	}
}

function requestSample(lang, pId) {
	//alert("Lang: "+lang+"\npId:  "+pId);
	var popSample = window.open(host+'echantillon.php?lang='+lang+'&pId='+pId,'plastique_micron_sample','width=600,height=400,scrollbars=no,resizable=yes');
	window.blur();
	popSample.focus();
}

function showMap(lang) {
	var popMap = window.open(host+'map.php?lang='+lang,'plastique_micron_map','width=630,height=450,scrollbars=no,resizable=yes');	
	window.blur();
	popMap.focus();
}

function showSubscribe(lang, arg) {
	var popSubscribe = window.open(host+'enregistrement.php?lang='+lang+'&type='+arg,'plastique_micron_subscribe','width=650,height=620,scrollbars=yes,resizable=yes');	
	window.blur();
	popSubscribe.focus();
}

function showJob(lang, id) {
	var popJob = window.open(host+'emplois.php?lang='+lang+'&id='+id,'plastique_micron_job','width=650,height=600,scrollbars=yes,resizable=yes');	
	window.blur();
	popJob.focus();
}

function showFormulaire(lang) {
	var popFormulaire = window.open(host+'formulaire.php?lang='+lang,'plastique_micron_formulaire','width=780,height=600,scrollbars=yes,resizable=yes');	
	window.blur();
	popFormulaire.focus();
}

function changeSection(section, subSection) {
	flashProxy.call('changeSection', section, subSection);
}

function flash() {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window.flashObject;
	} else {
		return window.document.flashObject;
	}
}