/*///////////////////////////////////////////////////////////////////////////////////////////////////////
Matt's updates

I'm trying to reorganize the JS as it's all over the place. I'm externalizing as much as possible.

Author: Matt Rossner - 08/27/2007

Dependencies - dom.js

///////////////////////////////////////////////////////////////////////////////////////////////////////*/

/* Globals */
var thisHost = location.host;

if (thisHost.indexOf("docguide.com") > -1) {
    document.domain = "docguide.com";
} else {
    document.domain = "peerviewpress.com";
}

var baseDomain = "";
var doDetection = 0;
var scrollerClickThroughNumber = -1;
var scrollerRequestedNumber = 1;
var pviReferenceID = 4; // Unknown
var scrollingLinksArray = new Array();
var showScrollerItems = true;
var currentScrollIndex = 0;
var reelID = "";
var PVID = "";
var IE = true;
var slideBanner;
var count = 0;
var intervalID;
var switchIntervalID;
var scrollFrame;
var surveyIntervalID;
var slidePanelActive = false;
var flashVersion = 0;
var ns6=document.getElementById&&!document.all;
var isSafari = (navigator.userAgent.toLowerCase().indexOf("safari") != -1);
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer < 5);

/**
  This iFrame is going to be used to show the fastcast slides
*/
function setupIframe() {
    if (navigator.userAgent.indexOf("MSIE") > -1) {
        IE = true;
        createContentIframe();
    } else if (!isSafari && ns6){ // Mozilla, FireFox
        IE = false;
        createContentIframe();
    } else {
        IE = false;
    }
}
addOnloadFunction('setupIframe');

function scrollBarInitialize() {
    if (!hideMediaBar) {

    initScroll();

    intervalID = setInterval('switchContent();', scrollSpeed);

    }
}
addOnloadFunction('scrollBarInitialize');

/**
  This creates the iframe via DOM methods.
*/
function createContentIframe() {
    var iFrameDiv = createDiv('slideContent','clsCBE');
    var iFrame = document.createElement('iframe');
    iFrame.setAttribute('id','slideIFrame');
    iFrame.setAttribute('class','slide');
    iFrame.setAttribute('name','slideIFrame');
    iFrame.setAttribute('frameborder','0');
    iFrame.setAttribute('marginwidth','0');
    iFrame.setAttribute('marginheight','0');
    iFrame.setAttribute('topmargin','0');
    iFrame.setAttribute('leftmargin','0');
    iFrame.setAttribute('src','');
    iFrame.setAttribute('scrolling','no');

    iFrameDiv.appendChild(iFrame);
    document.body.insert
    document.body.appendChild(iFrameDiv);
}

