	/**
	 * @package   Rumi Framework
	 * @version   1.0 Beta
	 * @author    Revandi M, Rumi Framework (http://rumi.vandenito.com)
	 * @copyright Copyright (C) 2010 Van De Nito. All rights reserved.
	 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
	 *
	 * Rumi Framework has been developed based on Joomla 1.5 CMS
	 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
	 * @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
	 */
 
function popupfly(ids){
	var elm = document.getElementById(ids);
	if(elm){
		setTimeout('this.hideWarning();', 10000);
		elm.onclick = function(){ hideWarning(); };
		makecenter(ids);
	}
	
	this.hideWarning = function(){
		var msgs = elm.style.display;
		if(msgs == "" || msgs == "block"){ elm.style.display = 'none'; }
	}
}

function makecenter(ids){
	var elm 	= document.getElementById(ids);
	var win		= windowsize();
	var elw		= elm.offsetWidth;
	var winw	= Math.ceil((win["x"]-elw)/2);
	elm.style.left = winw+"px";
}

function windowsize(){
	var w = 0, h = 0;
	var opera = (navigator.userAgent.indexOf("Opera") > -1) ? 1 : 0;
	if(document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight)){
		if(opera == true){
			w	= window.innerWidth;
			h	= window.innerHeight;
		}else{
			w	= document.documentElement.clientWidth;
			h	= document.documentElement.clientHeight;
		}
	}else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ){
		w	= document.body.clientWidth;
		h	= document.body.clientHeight;
	}else{
		w	= window.innerWidth;
		h	= window.innerHeight;
	}
	return {'x': w, 'y': h};
}