function WOpen(oURL, iWidth, iHeight)
{
  var iLeft = (screen.width  - iWidth) / 2 ;
  var iTop  = (screen.height - iHeight) / 2 ;

  var   sOptions = "toolbar=yes, status=no, resizable=no, dependent=yes, scrollbars=yes" ;
        sOptions += ",width="   + iWidth ; 
        sOptions += ",height="  + iHeight ;
        sOptions += ",left="    + iLeft ;
        sOptions += ",top="     + iTop ;

        var oWindow = window.open(oURL, '', sOptions); 

  return true;
}

function iOpen(oURL, iWidth, iHeight, dTitle)
{
  var iLeft = (screen.width  - iWidth) / 2 ;
  var iTop  = (screen.height - iHeight) / 2 ;
  var sOptions = "toolbar=no, status=no, resizable=no, dependent=yes, scrollbars=no";
      sOptions += ",width="   + iWidth ; 
      sOptions += ",height="  + iHeight ;
      sOptions += ",left="    + iLeft ;
      sOptions += ",top="     + iTop ;

  var oWindow = window.open('', '', sOptions); 

  oWindow.document.open();
  oWindow.document.write('<html><head><title>'+dTitle+'</title></head><body bgcolor="#FFFFFF"><img src="'+oURL+'"></body></html>');
  oWindow.document.close();

  return oWindow;
}

function SetAnimationOnLine () {
    $('#online_button').hover ( 
    		function () {
    			$(this).animate({
    			    left: '+=238'
    			  }, 100);
    		}, 
    		function () { 
    			$(this).animate({
    			    left: '-=238'
    			  }, 100);
    		}
    );
}

function hideOnLine() {
    $('#online_button').animate({
	    left: '-=238'
	  }, 100,
	  function() {
		  SetAnimationOnLine();
	  }); 
}

$(document).ready ( function () {
	var firstonline = $.cookie('firstonlineicss1346788');
	if (firstonline == '1') {
		$('#online_button').css('left', '-242px');
		SetAnimationOnLine ();
	} else { 
		$.cookie('firstonlineicss1346788', '1');
		setTimeout(hideOnLine, 5000);
	}
	
})
