﻿var rotatingTextElement;
var rotatingText = new Array();
var ctr = 0;

function initRotateText() {
    rotatingTextElement = document.getElementById("textToChange");
    rotatingText[0] = rotatingTextElement.innerHTML; 
    rotatingText[1] = "House Subcommittee Holds Oversight Hearing on Insurance <a class='links' href='javascript:null()'><font size='1'>More...</font></a>";
    rotatingText[2] = "Build Strong Submits Testimony to Two Congressional Panels <a class='links' href='javascript:null()'><font size='1'>More...</font></a>";
    rotatingText[3] = "Senate Committee Lauds Woodall, but Doesn’t Vote on Nomination <a class='links' href='javascript:null()'><font size='1'>More...</font></a>";
    rotatingText[4] = "Insurers Urge Senate OK for Insurance Rep on Financial Council <a class='links' href='javascript:null()'><font size='1'>More...</font></a>";
    setInterval(rotateText, 15000);
}
function rotateText() {
    ctr++;
    if(ctr >= rotatingText.length) {
        ctr = 0;
    }
    rotatingTextElement.innerHTML = rotatingText[ctr];
}
function pageWidth() {return window.innerWidth != null? window.innerWidth: document.body != null? document.body.clientWidth:null;}
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.body != null? document.body.clientHeight:null;} 
function getScreen() {
    var thisheight = screen.height - 100;
    var mainHeight = 1024;
    var myheight = (pageHeight() / 1.75);
    var mywidth = (pageWidth() / 2) - 160;
    switch(true)
    {
        case screen.height > 768:
        //    var iframe = document.getElementById ('wrkFrame');
        //    iframe.style.height = (pageHeight()-185) + 'px';
        //    var frameDoc = iframe.contentWindow.document;
        //    frameDoc.documentElement.style.overflow = 'hidden';
        break;
        default:
        //    document.getElementById('wrkFrame').style.height = '525px';
    }    
        document.getElementById('main').style.height = mainHeight + 'px';
        document.getElementById('agentsDiv').style.left = mywidth + 'px';
        document.getElementById('agentsDiv').style.top = 235 + 'px';
        document.getElementById('insuredDiv').style.left = mywidth + 'px';
        document.getElementById('insuredDiv').style.top = 235 + 'px';
}

//window.onload = initRotateText;


