function Launch_Locator(){
	window.open("http://www.ogilvy.com/company/locator/locator.html","locator","width=940,height=675,statusbar=0,menubar=0,scrollbars=0");
}

var our_work_popup;
var w = screen.width - 10;
var h = screen.height - 80;
function Our_Work(brand){
	var URL = "http://www.ogilvy.com/portfolio/portfolio.php";
	var scrollbars = screen.width < 1024 ? ", scrollbars=yes" : "scollbars=no";
	if(brand){URL = URL + "?brand=" + brand;}
	if(!our_work_popup || our_work_popup.closed){
		our_work_popup = window.open(URL, "portfolio", "height=" + h + ",width=" + w + ", screenX=0, screenY=0, top=0, left=0, status=0, toolbars=0, menubar=0, scrollbars=1");
	} else {
		our_work_popup.location.href = URL;
		our_work_popup.focus();
	}
}
function arobaceok(EMAIL) {
	var test="" + EMAIL;
	for(var k = 0; k < test.length;k++)	{
		var c = test.substring(k,k+1);
		if(c == "@") {
			return true;
		}
	}
	return false;
}

  
function verfiForm() {
	var errString = "";
	var fileCv = document.postuler.cv.value;
	var extCv = fileCv.substr(fileCv.length-4);
	var fileLm = document.postuler.lm.value;
	var extLm = fileLm.substr(fileLm.length-4);

	if (document.postuler.name.value=="") errString=errString+"- Votre nom est obligatoire.\n";
	if (document.postuler.firstname.value=="") errString=errString+"- Votre prénom est obligatoire.\n";
	if (!arobaceok(document.postuler.email.value)) errString=errString+"- Votre adresse mél est incorrecte.\n";
	if (document.postuler.phone.value=="") errString=errString+"- Votre téléphone est obligatoire.\n";
	if (extCv!="" && (extCv!=".doc" && extCv!=".pdf")) {
		errString =errString+"- Format du fichier du CV incorrect.\n";
	}
	if (extLm!="" && (extLm!=".doc" && extLm!=".pdf")) {
		errString =errString+"- Format du fichier de la lettre de motivation incorrect.\n";
	}
	
	if (errString!="") {
		alert(errString);
	} else {
		document.postuler.submit();
	}
}


var url="entree_libre.html";
var Left=(window.screen.width/2)-(386/2);
var Top=(window.screen.height/2)-(290/2);

function entreeLibre() {
	//window.open(url,'GroupeOgilvyParis','height=290,width=386,left='+Left+', top='+Top+',toolbar=0,status=yes,location=0,directories=0,menubar=0,scrollbars=0,resizable=0');
}

function popup(lien,namepop,w,h,scr,ph,pv){fen=window.open(lien,namepop,'width='+w+',height='+h+',left='+ph+',top='+pv+',scrollbars='+scr+',toolbar=no,menubar=no,resizable=no,location=no,directories=no,status=no');fen.focus();}
