/***** ftdAlsConference.ca - Developed by ScriptReaction - www.scriptreaction.com *****/

/********** global items **********/
var global = {
	launch: function (){
		//control document images
		for(var a=0; a<document.images.length; a++){
			var b = document.images[a];
			b.galleryimg = 'no';
			b.border = 0;
		}
	},
	goTop: function (){
		var y1=y2=y3=0;if(document.documentElement){y1=document.documentElement.scrollTop||0;};if(document.body){y2=document.body.scrollTop||0;};
		y3=window.scrollY||0;var y=Math.max(y1,Math.max(y2,y3));window.scrollTo(0,Math.floor(y/1.4));if(y>0){window.setTimeout('global.goTop()',25);};
	},
	emailcount: 0,
	email: function (){
		global.emailcount++;
		/*domain*/ var a = arguments[0];
		/*ca,com*/ var b = arguments[1];
		/*idname*/ var c = arguments[2];
		if(typeof(c)=='undefined'){
			c = b;
			b = 'com';
		}
		this['email' + global.emailcount] = c + '@' + a + '.' + b;
		document.write('<span onclick="global.doEmail(' + global.emailcount + ')" style="font-weight:normal;margin:0px;"><a href="http://www.ftdalsconference.ca/" onclick="return false">' + this['email' + global.emailcount] + '</a></span>');
	},
	doEmail: function (){
		var a = arguments[0]; top.location = 'mailto:' + this['email' + a];
	},
	forceEmail: function (){
		/*domain*/ var a = arguments[0];
		/*ca,com*/ var b = arguments[1];
		/*idname*/ var c = arguments[2];
		if(typeof(c)=='undefined'){
			c = b;
			b = 'com';
		}
		var address = c + '@' + a + '.' + b;
		top.location = 'mailto:' + address;		
	},
	setDivContent: function (divId,content){
		if(document.all){
			document.all[divId].innerHTML = content;
		}else{
			document.getElementById(divId).innerHTML = content;
		}
	},
	addEvent: function (object,eventType,functionName){
		if(object.addEventListener){
			object.addEventListener(eventType, functionName, false);
			return true;
		}else if(object.attachEvent){
			var x = object.attachEvent('on'+eventType, functionName);
			return x;
		}else{
			return false;
		}	
	}
}

/********** global init **********/
global.addEvent(window, 'load', global.launch);