﻿/******************** New Javascript File created by kishan. Primary focus on Browser compatibility**************/
/******************** Dated : 2nd Sept 2011 ********************************************************************/


function SetScreen() {
    //alert(window.screen.width);
    // alert(document.getElementById('mainTable').width.indexOf('px'));
    // alert(document.getElementById('mainTable').width);
    var tableWidth;

    if (document.getElementById('mainTable').width.indexOf('px') >= 0) {
        // alert('1');
        tableWidth = document.getElementById('mainTable').width.substring(0, document.getElementById('mainTable').width.length - 2) / 2;
        //alert('i m in if condition');
    }
    else {
        // alert('2');
        //alert('Width of the Table :'+ document.getElementById('mainTable').style.width);
        tableWidth = document.getElementById('mainTable').width / 2;
        //alert('i m in else condition');
    }

    //alert('Value of tableWidth :' + tableWidth);
    document.getElementById('mainTable').style.left = (window.screen.width / 2) - tableWidth + 'px';
    document.getElementById('mainTable').style.top = '0px';
    // alert(document.getElementById('mainTable').style.left);

    //alert('Chk double :' +window.screen.width / 2);
    //alert('Check Value :' + (window.screen.width / 2) - tableWidth + 'px');

}
