function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}

function vpwh() {
    if (typeof window.innerWidth != 'undefined') {
        $w = window.innerWidth,
        $h = window.innerHeight
    } else if (typeof document.documentElement != 'undefined'
        && typeof document.documentElement.clientWidth !=
        'undefined' && document.documentElement.clientWidth != 0) {
        $w = document.documentElement.clientWidth,
        $h = document.documentElement.clientHeight
    } else {
        $w = document.getElementsByTagName('body')[0].clientWidth,
        $h = document.getElementsByTagName('body')[0].clientHeight
    }
    return [$w, $h]
}

function ccent() {
    var $x = vpwh();
    var $w = $x[0];
    var $h = $x[1];

    var el = document.getElementById('bb');

    $w = ($w-900-280)/2;
    if ($w < 0)  $w = 0;
    el.style.left = $w+'px';

    $h = ($h-700)/4;
    if ($h<0) $h = 0;
    el.style.top = $h+'px';

    var rbp = document.getElementById('rbplayer');
    rbp.style.left = ($w + 860) + 'px';
    rbp.style.top = ($h + 265) + 'px';
}

function rload(){
    try {
	    mint.fx.Round("boxMessage");
	    mint.fx.Fade("boxMessage",90,1,1);
	    mint.fx.Fade("menu2",90,1,1);
	    mint.fx.Round("menu2");
	    mint.fx.Round("rbplayer");
	/*    mint.fx.Fade("rbplayer",90,1,1);*/

	    ccent()
    } catch (e) {

    }
    window.onresize = function() {
	try {
	        ccent();
	} catch (e) {

	}
    }

}

r(rload);


