
function loadGreetings() {

	var myLightWindow = new lightwindow({hideFlash: true});

	if (myLightWindow!=null) {
		
		myLightWindow.activateWindow({
			href: '../images/snowfinal.swf',
			title: '',
			author: '',
			width: 800,
			height: 600
		});
	}
	else {
		
		alert('not loaded');
	}
}

function alertStatus(e) {

	if (e.success == false) {
		$('swfmessage').style.display = 'block';	
	}
}
function init() {

	if(typeof sIFR == "function"){
		sIFR.replaceElement("h2", named({sWmode: 'transparent', sFlashSrc: "../bellgothic2.swf", sColor: "#005CB3", sFlashVars : 'fixExactly: true'}));
		sIFR.replaceElement("h4", named({sWmode: 'transparent', sFlashSrc: "../bellgothic2.swf", sColor: "#888888"}));
	};

	if (document.getElementById('firstinput')) {
		$('firstinput').focus();
	}

	if (document.getElementById('flash_splash')) {
		var params = { loop: true};
		var flashVars = {};
		var attributes = {};

		var currentURL = "" + window.location;
		var lang_en = currentURL.indexOf('/en') != -1;
		
		var flashFile = '';
		
		if (lang_en) {
			
			flashFile = 'center_en.swf';
		}
		else {
			flashFile = 'center_fr.swf';
		}

		swfobject.embedSWF("../images/" + flashFile, "flash_splash", "626", "279", "9", "expressInstall.swf", null, params, null, alertStatus);
		/*swfobject.embedSWF("../images/" + flashFile, "flash_splash", "626", "279", "8", "#000000", "../js/swfobject/expressInstall.swf", flashVars, params, attributes, alertStatus);*/
	}


	/*if (typeof greet != 'undefined') {
		loadGreetings();
	}
	*/
	
	if (document.getElementById('slideshow1')) {
		start_slideshow(1, 6, 2500);		

	}
	
	var currentURL = window.location;
	var hashObjID = '';
	
	if (currentURL.hash != '') {

		switch(currentURL.hash) {
	
			case '#managed-services':
				hashObjID = 'manserv';
				break;
	
			case '#la-garantie':
				hashObjID = 'lagarantie';
				break;
			
			case '#life-simple':
				hashObjID = 'lifesimple';
				break;
			
			case '#usercentric':
				hashObjID = 'usercentric';
				break;
			
			case '#suitea8':
				hashObjID = 'suitea8';
				break;
			
			case '#all-inclusive':
				hashObjID = 'all-inclusive';
				break;
			
			default:
				hashObjID = currentURL.hash.replace('#', '');
				break;
		}
	
		if (hashObjID != '') {
			Effect.Shake(hashObjID);
		}
	}
	
	

}

window.onload = init;

