/*
Title:      Main JavaScript	
Author:     Cristian Deschamps, cristian.deschamps@rocler.com
*/

// ------[ Master Onload for all page. ]------------------------------------------------- //	
window.Caillou = window.Caillou || {};

Caillou = {
	BaseUrl : "/",
	BaseImageUrl : "/Images/",
	
	Init : function() {
		
		// nothing to init...
		}
		
	
};
//YAHOO.util.Event.addListener(window, "load", Caillou.Init, Caillou, true);

	
// ------[ Popup Window ]------------------------------------------------- //
Caillou.Modal = function(url) {
	Caillou.PopWindow(url,640,520,1,0,'pop',1);
	}

Caillou.PopWindow = function(url,w,h,scroll,tools,name,center) {
	var str = "height=" + h + ",innerHeight=" + h;
	str += ",width=" + w + ",innerWidth=" + w;
	if(!center) var center = false;
	if(!scroll) scroll = 0;
	if(!tools) tools = 0;
	if(!name) name = "pop";
	if((window.screen) && (center)) {
		var ah = screen.availHeight - 30;
		var aw = screen.availWidth - 10;
		var xc = (aw - w) / 2;
		var yc = (ah - h) / 2;
		str += ",left=" + xc + ",screenX=" + xc;
		str += ",top=" + yc + ",screenY=" + yc;
		}
	pop = window.open(url,name,'toolbar=' + tools + ',location=0,directories=0,status=0,menubar=0,scrollbars=' + scroll + ',resizable=1,' + str).focus();
};

