// Copyright 2007 LiveFaceOnWeb, LLC
// Version 6.0.3
// User defined parameters

// Below enter the url where the swf file is located
// Example: var lf_URL = 'http://www.livefaceonweb.com/';
var lf_URL = 'http://www.bobcogo.com/f/';
// Below select the preset position of the LiveFaceOnWeb presentation
// 1 = Top left of the browser screen
// 2 = Top right of the browser screen
// 3 = Bottom left of the browser screen
// 4 = Bottom right of the browser screen
// 5 = Middle of the browser screen
// Example: var lf_Position = 4; would be possitioned on bottom right
var lf_Position = 4;
// Below enter the delay lenght in seconds before the presentation appears
// Example: var lf_tDLB = 5; would show the presentation after 5 seconds
// Example: var lf_tDLB = 0; would show the presentation instantly
var lf_tDLB = 0;
// Below enter the amount of seconds the video presentation appears for after it has completed playing
// Example: var lf_TimeDelayAfter = 0; would disable this option
// Example: var lf_tDLA = 5; would close the presentation 5 seconds after is has completed playing
var lf_tDLA = 0;
// Below select how often you would like the presentation to appear for the same visitor
// 1 = Play everytime
// 2 = Play ones per visitors session
// 3 = Play in so many days
// Example: var lf_PresPlay = 1; would play the presentation every time
// Example: var lf_PresPlay = 3; and var lf_PresPlayDays = 1; would play the presentation ones every day
var lf_PresPlay = 1;
var lf_PresPlayDays = 0;
//  Below select select if you would like to have a static position for your presentation 
//  Example: var staticPosition = 'no'; would display the presentation with scroll affect
//  Example: var staticPosition = 'yes'; and var presentationLeftPosition = 0; and var presentationTopPosition = 0; would position the presentation on the top right
var staticPosition = 'no';
var presentationLeftPosition = 0;
var presentationTopPosition = 0;
// Below enable the Click On Me Functionality for the presentation
// Example: var lf_cOMW = 1; enables the Click On Me Functionality
// Example: var lf_cOMW = 0; disables the Click On Me Functionality
var lf_cOMW = 0;
// Below enter the Click On Me URL
// Example: var lf_cOMURL = 'http://www.livefaceonweb.com'
var lf_cOMURL = 'http://www.bobcogo.com';
// Below select Click On Me Window Settings
// Example: var lf_cOMWP = 1; opens the window in a new broswer screen
// Example: var lf_cOMWP = 0; opens the window in the same browser screen
var lf_cOMWP = 0;
// Below enable Fade In effect
// Example: var lf_fIE = 1; enables the Fade In effect
// Example: var lf_fIE = 0; disables the Fade In effect
var lf_fIE = 1;
// Below enter the duration of Fade In effect in seconds
// Example: var lf_fIET = 5; fades in the presentation in 5 seconds
var lf_fIET = 1;
// Below select the presentation play status while in fade in effect
// Example: var lf_fIET = 1; plays the presentation after the fade in effect has completed
// Example: var lf_fIET = 0; plays the presentation while the fade in effect is occuring
var lf_fIEP = 1;
// Below enable Fade Out effect
// Example: var lf_fOE = 1; enables the Fade Out effect
// Example: var lf_fOE = 0; disables the Fade Out effect
var lf_fOE = 1;
// Below enter the duration of Fade Out effect in seconds
// Example: var lf_fOET = 5; fades out the presentation in 5 seconds
var lf_fOET = 1;
// Below enable Play Button Function before the presentation starts
// Example: var lf_pBBE = 1; enabled the Play Button Function before the presentation starts
// Example: var lf_pBBE = 0; disables the Play Button Function before the presentation starts
var lf_pBBE = 0;
// Below enable Play Button Function before the presentation starts to appear on top of the model
// Example: var lf_pBBBOF = 1; enabled the Play Button Function before the presentation starts to appear on top of the model
// Example: var lf_pBBBOF = 0; disables the Play Button Function before the presentation starts to appear on top of the model
var lf_pBBBOF = 0;
// Below enable Play Button Function after the presentation ends
// Example: var lf_pBAE = 1; enabled the Play Button Function after the presentation ends
// Example: var lf_pBAE = 0; disables the Play Button Function after the presentation ends
var lf_pBAE = 0;
// Below enable Play Button Function after the presentation ends to appear on top of the model
// Example: var lf_pBAOF = 1; enabled the Play Button Function after the presentation ends to appear on top of the model
// Example: var lf_pBAOF = 0; disables the Play Button Function after the presentation ends to appear on top of the model
var lf_pBAOF = 0;
// Below enable the Roll Over To Play Effect
// Example: var lf_rOTPE = 1; enables the Roll Over To Play Effect
// Example: var lf_rOTPE = 0; disables the Roll Over To Play Effect
var lf_rOTPE = 0;
// Below enter the URL of a SWF files for the Roll Over To Play Effect
// Example: var lf_rOTPURL = 'http://www.livefaceonweb.com/test.swf'; displays the swf file in as the Roll Over To Play Effect
var lf_rOTPURL = '';
// Below enable the frame hold option
// Example: var lf_sFRAME = 0; shows the first frame while fade in/out, play button, and roll over effects
// Example: var lf_sFRAME = 7; shows the 7th frame while fade in/out, play button, and roll over effects
var lf_sFRAME = 0;
// Below enter your LiveFaceOnWeb.com affiliate id number
// Example: var affiliateID = '80961c09';
var lf_AffiliateID = '';
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///Do not change the parameters below//////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
var lf_SWF_File_Width = 170;
var lf_SWF_File_Height = 325;
var lf_ID = '100000482';

var lf_divHorPos = 0;
var lf_divVerPos = 0;
var lfVersion = -1;
var arrNavInfo = [];
var lfString;
var lfParamString;
var divID = 'div' + lf_ID;

arrNavInfo.navprop = navigator.userAgent.toLowerCase();

if (navigator.vendor == 'KDE' || ( document.childNodes && ( !document.all || navigator.accentColorName ) && !navigator.taintEnabled )) {
    arrNavInfo[0] = 'kde';
    arrNavInfo[1] = 'Safari';
}
else if (document.layers) {
    arrNavInfo[0] = 'ns4';
    arrNavInfo[1] = 'Netscape 4';
}
else if (window.opera && document.childNodes) {
    arrNavInfo[0] = 'op7';
    arrNavInfo[1] = 'Opera 7+';
}
else if (arrNavInfo.navprop.indexOf('opera') + 1) {
    arrNavInfo[0] = 'opr';
    arrNavInfo[1] = 'Opera 6-';
}
else if (navigator.appName.indexOf('WebTV') + 1) {
    arrNavInfo[0] = 'wtv';
    arrNavInfo[1] = 'WebTV';
}
else if (navigator.product == 'Gecko') {
    arrNavInfo[0] = 'gek';
    arrNavInfo[1] = 'Gecko engine (Mozilla, Netscape 6+ etc.)';
}
else if (document.getElementById) {
    arrNavInfo[0] = 'ie5';
    arrNavInfo[1] = 'Internet Explorer 5+';
}
else if (document.all && navigator.appName != 'Microsoft Pocket Internet Explorer') {
    arrNavInfo[0] = 'ie4';
    arrNavInfo[1] = 'Internet Explorer 4';
}
else if ((arrNavInfo.navprop.indexOf('msie') + 1 ) && window.ActiveXObject) {
    arrNavInfo[0] = 'pie';
    arrNavInfo[1] = 'Pocket Internet Explorer';
}
else {
    arrNavInfo[0] = 'na';
    arrNavInfo[1] = 'an unknown browser';
}
if (arrNavInfo.navprop.indexOf('linux') + 1) {
    arrNavInfo[2] = 'lin';
    arrNavInfo[3] = 'Linux';
}
else if (arrNavInfo.navprop.indexOf('x11') + 1) {
    arrNavInfo[2] = 'unx';
    arrNavInfo[3] = 'Unix';
}
else if (arrNavInfo.navprop.indexOf('mac') + 1) {
    arrNavInfo[2] = 'mac';
    arrNavInfo[3] = 'MacOS';
}
else if (navigator.platform == 'PalmOS') {
    arrNavInfo[2] = 'plm';
    arrNavInfo[3] = 'Palm OS';
}
else if (( navigator.platform == 'WinCE' ) || ( navigator.platform == 'Windows CE' ) || ( navigator.platform == 'Pocket PC' )) {
    arrNavInfo[2] = 'wce';
    arrNavInfo[3] = 'Windows CE';
}
else if (arrNavInfo.navprop.indexOf('win') + 1) {
    arrNavInfo[2] = 'win';
    arrNavInfo[3] = 'Windows';
}
else if (arrNavInfo.navprop.indexOf('webtv') + 1) {
    arrNavInfo[2] = 'wtv';
    arrNavInfo[3] = 'WebTV Platform';
}
else {
    arrNavInfo[2] = 'na';
    arrNavInfo[3] = 'an unknown operating system';
}

if (navigator.plugins != null && navigator.plugins.length > 0)
{
    if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])
    {
        var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
        var lfDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
        var descArray = [];
        var tempArrayMajor = [];
        var versionMajor = [];
        var tempArrayMinor = [];
        var versionMinor;
        descArray = lfDescription.split(" ");
        tempArrayMajor = descArray[2].split(".");
        versionMajor = tempArrayMajor[0];
        if (descArray[3] != "")
        {
            tempArrayMinor = descArray[3].split("r");
        }
        else
        {
            tempArrayMinor = descArray[4].split("r");
        }
        versionMinor = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
        lfVersion = parseFloat(versionMajor + "." + versionMinor);
    }
}
else
{
    for (var i = 8; i < 10; i++)
    {
        try
        {
            var objFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
            if (objFlash) {
                lfVersion = i;
            }
        }
        catch(e)
        {
        }
    }
}

if (window.addEventListener) window.addEventListener("load", doLFOW, false);
else if (window.attachEvent) window.attachEvent("onload", doLFOW);
function doLFOW() {
    if (lf_PresPlay == 1) {
        lf_createCookie(lf_ID, "on", -1);
        if (staticPosition == 'no')
        {
            StartVideo();
        }
        else
        {
            StartVideoStatic();
        }
    } else if (lf_PresPlay == 2) {
        if (lf_readCookie(lf_ID) == 'no') {
            lf_createCookie(lf_ID, "on");
            if (staticPosition == 'no')
            {
                StartVideo();
            }
            else
            {
                StartVideoStatic();
            }
        }
    } else if (lf_PresPlay == 3) {
        if (lf_readCookie(lf_ID) == 'no') {
            lf_createCookie(lf_ID, "on", lf_PresPlayDays);
            if (staticPosition == 'no')
            {
                StartVideo();
            }
            else
            {
                StartVideoStatic();
            }
        }
    }
}
function StartVideo()
{
    var elDiv = document.createElement("div");
    elDiv.id = divID;
    elDiv.style.position = "absolute";
    elDiv.style.zIndex = 9999;
    elDiv.style.left = 0;
    elDiv.style.top = 0;
    elDiv.style.height = lf_SWF_File_Height;
    elDiv.style.width = lf_SWF_File_Width;
    elDiv.style.visibility = "visible";

    switch (arrNavInfo[0])
            {
        case 'ie5':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
                window.onscroll = ScrollHnd;
                window.onresize = ScrollHnd;
                window.setInterval('ScrollHnd()', 30);
                ScrollHnd();
            }
            break;
        case 'gek':
            if (lfVersion > 7)
            {
                showLFOW();
                if (window.onscroll === undefined)
                {
                    elDiv.innerHTML = lfString;
                    document.body.appendChild(elDiv);
                    window.setInterval('ScrollHnd()', 30);
                    ScrollHnd();
                }
                else
                {
                    elDiv.innerHTML = lfString;
                    document.body.appendChild(elDiv);
                    window.onscroll = ScrollHnd;
                    window.onresize = ScrollHnd;
                    ScrollHnd();
                }
            }
            break;
        case  'op7':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
                window.onscroll = ScrollHnd;
                window.onresize = ScrollHnd;
                ScrollHnd();
            }
            break;
        case  'kde':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
                window.onscroll = ScrollHnd;
                window.onresize = ScrollHnd;
                ScrollHnd();
            }
            break;
    }
}
function StartVideoStatic()
{
    var elDiv = document.createElement("div");
    elDiv.id = divID;
    elDiv.style.position = "absolute";
    elDiv.style.zIndex = 9999;
    elDiv.style.left = presentationLeftPosition;
    elDiv.style.top = presentationTopPosition;
    elDiv.style.height = lf_SWF_File_Height;
    elDiv.style.width = lf_SWF_File_Width;
    elDiv.style.visibility = "visible";
    switch (arrNavInfo[0])
            {
        case 'ie5':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
            }
            break;
        case 'gek':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
            }
            break;
        case  'op7':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
            }
            break;
        case  'kde':
            if (lfVersion > 7)
            {
                showLFOW();
                elDiv.innerHTML = lfString;
                document.body.appendChild(elDiv);
            }
            break;
    }
}
function ScrollHnd()
{
    var divScroll;
    var wnd;
    var screenWd = 0;
    var screenHt = 0;
    var screenX = 0;
    var screenY = 0;
    var objDoc;
    var divLeft = 0;
    var divTop = 0;

    objDoc = document;
    wnd = window;

    if (objDoc.getElementById) {
        divScroll = objDoc.getElementById(divID);
        if (divScroll.style) {
            divScroll = divScroll.style;
        }
    }
    if (window.innerHeight)
    {
        screenHt = wnd.innerHeight;
        screenWd = wnd.innerWidth;
    }
    else if (objDoc.documentElement && ( objDoc.documentElement.clientWidth || objDoc.documentElement.clientHeight ))
    {
        screenWd = objDoc.documentElement.clientWidth;
        screenHt = objDoc.documentElement.clientHeight;

    }
    else if (objDoc.body && ( objDoc.body.clientWidth || objDoc.body.clientHeight ))
    {
        screenWd = objDoc.body.clientWidth;
        screenHt = objDoc.body.clientHeight;
    }
    if (window.innerHeight)
    {
        screenY = wnd.pageYOffset;
        screenX = wnd.pageXOffset;
    }
    else if (objDoc.body && ( objDoc.body.scrollLeft || objDoc.body.scrollTop ))
    {
        screenY = objDoc.body.scrollTop;
        screenX = objDoc.body.scrollLeft;
    }
    else     if (objDoc.documentElement && ( objDoc.documentElement.scrollLeft || objDoc.documentElement.scrollTop ))
    {
        screenY = objDoc.documentElement.scrollTop;
        screenX = objDoc.documentElement.scrollLeft;
    }
    divLeft = divLeft + lf_divHorPos;
    divTop = divTop + lf_divVerPos;
    divLeft = divLeft + screenX;
    divTop = divTop + screenY;

    if (lf_Position == 5)
    {
        divLeft = divLeft + ((screenWd / 2) - (lf_SWF_File_Width / 2));
        divTop = divTop - ((screenHt / 2) - (lf_SWF_File_Height / 2));
    }
    if (( lf_Position % 2 ) == 0)
    {
        divLeft = divLeft + (screenWd - lf_SWF_File_Width);
    }
    if (( lf_Position < 3 ) == false)
    {
        divTop = divTop + (screenHt - lf_SWF_File_Height);
    }
    divScroll.left = divLeft + 'px';
    divScroll.top = divTop + 'px';
}
function showLFOW()
{
    lfParamString = '?lfID=' + lf_ID + '&cOMW=' + lf_cOMW + '&cOMURL=' + escape(lf_cOMURL) + '&cOMWP=' + lf_cOMWP + '&tDLB=' + lf_tDLB + '&tDLA=' + lf_tDLA + '&fIE=' + lf_fIE + '&fIET=' + lf_fIET + '&fIEP=' + lf_fIEP + '&fOE=' + lf_fOE + '&fOET=' + lf_fOET + '&pBBE=' + lf_pBBE + '&pBBBOF=' + lf_pBBBOF + '&pBAE=' + lf_pBAE + '&pBAOF=' + lf_pBAOF + '&rOTPE=' + lf_rOTPE + '&rOTPURL=' + escape(lf_rOTPURL) + '&sFRAME=' + lf_sFRAME + '&lfAffiliateID=' + lf_AffiliateID + '&sURL_Site=' + escape(document.location.href);
    lfString = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='" + lf_SWF_File_Width + "' height='" + lf_SWF_File_Height + "' id='obj" + lf_ID + "' align='middle' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0' >";
    lfString += "<param name='movie' value='" + lf_URL + 'lfow.swf' + lfParamString + "' />";
    lfString += "<param name='quality' value='high' />";
    lfString += "<param name='wmode' value='transparent' />";
    lfString += "<param name='allowScriptAccess' value='always' />";
    lfString += "<param name='loop' value='false' />";
    lfString += "<embed src='" + lf_URL + 'lfow.swf' + lfParamString + "' allowScriptAccess='always' quality='high' wmode='transparent' loop='false' width='" + lf_SWF_File_Width + "' height='" + lf_SWF_File_Height + "' name='obj" + lf_ID + "' align='middle' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' />";
    lfString += "</object>";
}
function lf_createCookie(strName, strValue, strDays)
{
    if (strDays) {
        var date = new Date();
        date.setTime(date.getTime() + (strDays * 24 * 60 * 60 * 1000));
        var expires = '; expires=' + date.toGMTString();
    } else var expires = '';
    document.cookie = strName + '=' + strValue + expires + '; path=/';
}
function lf_readCookie(strName) {
    var strNameplus = strName + '=';
    var arrCk = document.cookie.split(';');
    for (var i = 0; i < arrCk.length; i++) {
        var c = arrCk[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(strNameplus) == 0) return c.substring(strNameplus.length, c.length);
    }
    return 'no';
}