﻿// UTF-8
var groupevagabone;
var remLien;
var q;

function getFlash() {
	return document.getElementById("flashObject");
}


function buildStrProps () {	
	var ww = 1280;
	var wh = 768;
	var px = 224;
	var py = 0;
	
	if (window.screen) {
		ww = Math.min(ww,screen.availWidth);
		wh = Math.min(wh,screen.availHeight);
		px = screen.availWidth - ww;
	} else {
		px = 1024 - ww;
	}
	return "left="+px+",screenX="+px+",top="+py+",screenY="+py+",width="+ww+",height="+wh;
}

function openWindow (lien, param) {
//alert(arguments.length);
	remLien = lien;
	if (groupevagabone === true) {
		document.location.href = lien;
	} else {
		doOpenWindow (lien, param);
	}
}

function doOpenWindow (lien, param) {
	var str = (param != undefined) ? param : buildStrProps(param) ;
	q = window.open(lien, "newWin", str+",scrollbars=1,resizable=1");
	try {
		if (q.focus != undefined) {
			q.focus();
		} else {
			throw lien;
		} 
	} catch(e){
		//alert("Votre fureteur a refusé l'ouverture d'une fenêtre. Rendez-vous à cette adresse: \nhttp://www.boutiquevagabond.com/faistavalise/");
		document.location.href = lien;
	}
}

function openWindowPopUp (lien, param) {
	var str = (param != undefined) ? param : buildStrProps(param) ;
	q = window.open(lien, "newWin", str);
	try {
		if (q.focus != undefined) {
			q.focus();
		} else {
			throw lien;
		} 
	} catch(e){
		//alert("Votre fureteur a refusé l'ouverture d'une fenêtre. Rendez-vous à cette adresse: \nhttp://www.boutiquevagabond.com/faistavalise/");
		document.location.href = lien;
	}
}