function fixMargin() // Setting left offset of main block
{
 bodywidth = document.body.clientWidth;
 maindiv =  document.getElementById( "main" );
 if( bodywidth > maindiv.offsetWidth )
   offset = ( bodywidth / 2 ) - ( maindiv.offsetWidth/2 );
 else
       offset = 0;

 maindiv.style.left = offset+"px";
}

function setStyle(a) // Setting stylesheet file considering screen dimensions
{if( screen.width >= 1024 )
stylesheet = ('<link rel=\'stylesheet\' href=\"')+(a)+('1024.css\" type=\'text\/css\' \/>');
if( screen.width <= 800 )
stylesheet = ('<link rel=\"stylesheet\" href=\"')+(a)+('800.css\" type=\"text\/css\" \/>');
document.write( stylesheet );
}

