var eventHandler = function(){
	var args = this.eventHandler.arguments;
	if(document.attachEvent){
		args[0].attachEvent('on'+ args[1], args[2]);
	}
	else if(document.addEventListener){
		args[0].addEventListener(args[1], args[2], false);
	}
	else{
		return;
	}
};

var $ = function(o){
	return document.getElementById(o);
}


var ALICO = function(){
	var alico = {
		page : function(){
			var p = {
				getSize : function(){
					var _window = {'width' : 0, 'height' : 0};

					if(self.innerHeight){
						_window.width	= self.innerWidth;
						_window.height	= self.innerHeight;
					}
					else if(document.documentElement && document.documentElement.clientHeight){
						_window.width	= document.documentElement.clientWidth;
						_window.height	= document.documentElement.clientHeight;
					}
					else if(document.body){
						_window.width	= document.body.clientWidth;
						_window.height	= document.body.clientHeight;
					}

					return _window;
				},

				getScrollTop : function(){
					var _top;

					if (document.documentElement && document.documentElement.scrollTop)
						_top = document.documentElement.scrollTop;
					else if (document.body)
						_top = document.body.scrollTop;

					return _top;
				}
			}

			return p;
		},

		divCentered : function(w,h){
			if($('ana')){
				//$('ana').style.top	= (alico.page().getScrollTop() + (alico.page().getSize().height - h)) / 2 +'px';
				// İSTERSEN Burayıda Kullan Bu Sefer Divi Sayfanın Ortasına Yapıştırır
				$('ana').style.left	= (alico.page().getSize().width - w) / 2 +'px';
			}
		}
	}

	return alico;
}

eventHandler(window,	'load',		function(){ ALICO().divCentered(789,475); } );
eventHandler(window,	'resize',	function(){ ALICO().divCentered(789,475); } );
eventHandler(window,	'scroll',	function(){ ALICO().divCentered(789,475); } );



