/* ---------- HOME PAGE SLIDESHOW ARRAYS & FUNCTION ---------- */

// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// slideShowSpeed (milliseconds)
var slideShowSpeed = 3500;

gifs    = new Array();
gifs[0] = "images/banner19.jpg";
gifs[1] = "images/banner13.jpg";
gifs[2] = "images/banner10.jpg";
gifs[3] = "images/banner07.jpg";

var j = 0;

var p = gifs.length;
var timer;
var preLoad = new Array()

for (i = 0; i < p; i++) {
   preLoad[i] = new Image()
   preLoad[i].src = gifs[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=1)";
      document.images.SlideShow.filters.blendTrans.Apply();
   }
   document.images.SlideShow.src = preLoad[j].src;
   if (document.all)
      document.images.SlideShow.filters.blendTrans.Play();
   j++;
   if(j > (p-1))
       j=0;
   timer = setTimeout('runSlideShow()', slideShowSpeed);
}



/* ---------- IMAGE ROLLOVER ---------- */
function replaceImg(imgName, imgFileName)
{
    if(document.images)
        document.images[imgName].src = "images/" + imgFileName;
}



/* ---------- HOME PAGE TEXT ARRAYS & FUNCTION ---------- */

homeToggle = new Array();
/* GHI */ homeToggle[0] = "<SPAN CLASS=\"text14px\"><B>Group Health Incorporated (GHI) and HIP Health Plan of New York (HIP) are now affiliated companies operating under a common parent, EmblemHealth, Inc.</B></SPAN><BR><BR>HIP and GHI announced their intention to merge in 2005, and affiliation is a first step towards combining the two companies. With 5,400 employees, GHI and HIP together are now the largest health insurer based in New York State serving more than 4 million people with over 92,000 providers in 142,000 locations across the Tri-State region.";
/* HIP */ homeToggle[1] = "<SPAN CLASS=\"text14px\"><B>HIP Health Plan of New York (HIP) and Group Health Incorporated (GHI) are now affiliated companies operating under a common parent, EmblemHealth, Inc.</B></SPAN><BR><BR>GHI and HIP announced their intention to merge in 2005, and affiliation is a first step towards combining the two companies. With 5,400 employees, HIP and GHI together are now the largest health insurer based in New York State serving more than 4 million people with over 92,000 providers in 142,000 locations across the Tri-State region.";

function displayHomeToggle()
{
    var whichFirst = readCookie('company');

    if(whichFirst == "GHI")
        document.write(homeToggle[0]);
    else
        document.write(homeToggle[1]);
}



/* ---------- COMPANIES PAGE TEXT ARRAYS & FUNCTION ---------- */

companyIntro = new Array();
/* GHI */ companyIntro[0] = "For over seventy years GHI and HIP have shared a commitment to providing broad access to quality health care coverage. Our companies offer complementary products, programs and networks.<BR><BR>";
/* HIP */ companyIntro[1] = "For over seventy years HIP and GHI have shared a commitment to providing broad access to quality health care coverage. Our companies offer complementary products, programs and networks.<BR><BR>";

var GHIblock = "";

GHIblock += "<SPAN CLASS=\"text14px\">GHI</SPAN><BR>";
GHIblock += "<IMG SRC=\"images/line517x2_999999.gif\" BORDER=0 WIDTH=517 HEIGHT=1 ALT=\"\" STYLE=\"margin-bottom:8px;\"><BR>";
GHIblock += "<IMG SRC=\"images/comps_ghi_montage.gif\" BORDER=0 WIDTH=230 HSPACE=0 HEIGHT=25 VSPACE=5 ALT=\"\" ALIGN=RIGHT USEMAP=\"#ghiCompMap\">";
GHIblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"ghi.html\">GHI</A><BR>";
GHIblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"ghihmo.html\">GHI HMO</A><BR>";

var HIPblock = "";

HIPblock += "<SPAN CLASS=\"text14px\">HIP</SPAN><BR>";
HIPblock += "<IMG SRC=\"images/line517x2_999999.gif\" BORDER=0 WIDTH=517 HEIGHT=1 ALT=\"\" STYLE=\"margin-bottom:8px;\"><BR>";
HIPblock += "<IMG SRC=\"images/comps_hip_montage.gif\" BORDER=0 WIDTH=230 HSPACE=0 HEIGHT=62 VSPACE=5 ALT=\"\" ALIGN=RIGHT USEMAP=\"#hipCompMap\">";
HIPblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"hip.html\">HIP</A><BR>";
HIPblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"connecticare.html\">ConnectiCare</A><BR>";
HIPblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"perfecthealth.html\">PerfectHealth</A><BR>";
HIPblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"vytra.html\">Vytra Health Plans</A><BR>";
HIPblock += "<IMG SRC=\"images/bullet3x3_999999.gif\" BORDER=0 WIDTH=9 HEIGHT=9 ALT=\"\"><A HREF=\"hipa.html\">Health Insurance Plan Administrators</A><BR>";

companyLst = new Array();
companyLst[0] = GHIblock;
companyLst[1] = HIPblock;

function displayCompaniesToggle()
{
    var whichFirst = readCookie('company');

    if(whichFirst == "GHI") { //i.e. GHI is first on home page
        document.write(companyIntro[1]); //HIP intro first
        document.write(companyLst[1] + "<BR>"); //HIP company list first
        document.write(companyLst[0]); //GHI company list second
    }
    else { //i.e. HIP is first on home page
        document.write(companyIntro[0]); //GHI intro first
        document.write(companyLst[0] + "<BR>"); //GHI company list first
        document.write(companyLst[1]); //HIP company list second
    }
}
