/*****************************************************
 * Javascript for handling the sticky ad.
 * @version 1.0 2008.12.04
 ****************************************************/

var ie; 
var off = 0;
var cobjorig = 962;
var dbwo;

function setSticky()
{
	return 0; //remove when sticky present

	if( typeof( window.innerWidth ) == 'number' ) {
  	ie = 0;
  } else {
  	ie = 1;
  }
	
	moveSticky();
	
	obj = document.getElementById( 'banner_fixed' );
	obj.style.visibility = 'visible';
}
 
function moveSticky()
{
	return 0; //remove when sticky present
	obj = document.getElementById( 'banner_fixed' );
	cobj = document.getElementById( 'start_mainbox' );
	var dbw = document.body.clientWidth;
	var x = ( dbw / 2 ) + ( 982 / 2) + 10;
	
	if ( dbw < ( 992 + 360 ) )
	{
		cmargin = dbw - 1162;
		if ( cmargin < 10 )
			cmargin = 10;
		x = cmargin + 982;
		//document.body.setAttribute( 'style', 'text-align: left;' );
		//cobj.setAttribute( 'style', 'margin: 0px; margin-left: ' + cmargin + 'px;');
		off = 1;
		bgoff = cmargin - 216;
		obj.style.left = x + 'px';
		if ( dbw != dbwo )
		{
			if ( ie == 0 )
			{
				cobj.setAttribute( 'style', ' margin: 0px; margin-left: ' + cmargin + 'px;' );
				document.body.setAttribute( 'style', 'text-align: left; background-position: ' + bgoff + 'px 0px;');
			}
			else
			{
				cobj.style.cssText = ' margin: 0px; margin-left: ' + cmargin + 'px;';
				document.body.style.cssText = 'text-align: left; background-position: ' + bgoff + 'px 0px;';
			}
			
			dbwo = dbw;
		}
		if ( ie == 1 )
		{
			moveto = document.body.scrollTop;
			obj.style.top = moveto  + 'px';
		}

	}
	else
	{
		if ( off == 1 )
		{
			if ( ie == 0 )
			{
				cobj.setAttribute( 'style', ' margin: auto;' );
				document.body.setAttribute( 'style', 'text-align: center; background-position: top center');
			}
			else
			{
				cobj.style.cssText = ' margin: auto;';
				document.body.style.cssText = 'text-align: center; background-position: top center;';
	
			}
			off = 0;

		}
  	if ( ie==1 )
  	{
			moveto = document.body.scrollTop;
			obj.style.top = moveto  + 'px';
		}
		obj.style.left = x + 'px';
	}

 	
}
