
// Remote Control for Search, Email, & GTCC
// Open window function
function openWindow( pageToLoad, winName, width, height, center) {
	xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center)){
        xposition = (screen.width - width) / 2;
        yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + "," 
    + "height=" + height + "," 
    + "location=0," 
    + "menubar=0,"
    + "resizable=1,"
    + "scrollbars=0,"
    + "status=0," 
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only

    remote = window.open( pageToLoad,winName,args );
    if(remote.opener == null) remote.opener = window;
    remote.opener.name = "opener";
    
}

// ------------------------------------------
// Display today's date
// Create an array
function makeArray(len) {
    for (var i = 0; i < len; i++) this[i] = null;
this.length = len;
}

// Array of day names
var dayNames = new makeArray(7);
dayNames[0] = "Sunday";
dayNames[1] = "Monday";
dayNames[2] = "Tuesday";
dayNames[3] = "Wednesday";
dayNames[4] = "Thursday";
dayNames[5] = "Friday";
dayNames[6] = "Saturday";

// Array of month Names
var monthNames = new makeArray(12);
monthNames[0] = "January";
monthNames[1] = "February";
monthNames[2] = "March";
monthNames[3] = "April";
monthNames[4] = "May";
monthNames[5] = "June";
monthNames[6] = "July";
monthNames[7] = "August";
monthNames[8] = "September";
monthNames[9] = "October";
monthNames[10] = "November";
monthNames[11] = "December";

var now = new Date();
var day = now.getDay();
var month = now.getMonth();
var year = now.getYear();
var date = now.getDate();

// --------------------------------------
// Semester Countdown
// Days Remaining
var then = new Date("May 10, 2004");
var gap = then.getTime() - now.getTime();
gap = Math.floor(gap / (1000 * 60 * 60 * 24));

// --------------------------------------
// Display Random Quotes
// Quotes Array Function 

function makeArray(len) {
    for (var k = 0; k < len; k++) this[k] = null;
this.length = len;
}

// Quotation array

ideas = new makeArray(10);
ideas[0] = "If 50 million people believe a foolish thing, it is still a foolish thing.<br /><br />--Anatole France";
ideas[1] = "I do not feel obliged to believe the same God who endowed us with sense, reason, and intellect had intended for us to forego their use.<br /><br />--Galileo";
ideas[2] = "It is surely harmful to souls to make it a heresy to believe what is proved.<br /><br />--Galileo";
ideas[3] = "Generally speaking, the errors in religion are dangerous; <br />those in philosophy only ridiculous. <br /><br />-- David Hume";
ideas[4] = "... to argue with a man who has renounced his reason is like giving medicine to the dead.<br /><br />--Robert Ingersoll";
ideas[5] = "The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn.<br /><br />--Alvin Toffler";
ideas[6] = "Chicken Little only has to be right once.<br /><br />--Unknown";
ideas[7] = "He that cannot reason is a fool; he that will not is a bigot; <br />He that dare not is a slave.<br /><br />--Sir William Drummond";
ideas[8] = "Life can only be understood backwards, but it must be lived forwards.<br /><br />-- Soren Kierkiguard";
ideas[9] = "Shall I tell you the secret of the true scholar? It is this: Every man I meet is my master in some point, and in that I learn of him.<br /><br />--  Ralph Waldo Emerson";


// Seed Function
function rand(n) {
seed = (0x015a4e35 * seed) % 0xfffffff;
return (seed >> 16) % n;
}

// Random function
var rightnow = new Date();
var seed = rightnow.getTime() % 0x7fffffff;


