﻿// JScript File

//This script detects the following:
//Flash
//Windows Media Player
//Java
//Shockwave
//RealPlayer
//QuickTime
//Acrobat Reader
//SVG Viewer


var agt=navigator.userAgent.toLowerCase();
var ie  = (agt.indexOf("msie") != -1);
var ns  = (navigator.appName.indexOf("Netscape") != -1);
var win = ((agt.indexOf("win")!=-1) || (agt.indexOf("32bit")!=-1));
var mac = (agt.indexOf("mac")!=-1);

if (ie && win) {	pluginlist = detectIE("SWCtl.SWCtl.1","Shockwave Director") + detectIE("ShockwaveFlash.ShockwaveFlash.1","Shockwave Flash") ; }
if (ns || !win) {
		nse = ""; for (var i=0;i<navigator.mimeTypes.length;i++) nse += navigator.mimeTypes[i].type.toLowerCase();
		pluginlist = detectNS("application/x-director","Shockwave Director") + detectNS("application/x-shockwave-flash","Shockwave Flash") ;
}

function detectIE(ClassID,name) { result = false; document.write('<SCRIPT LANGUAGE=VBScript>\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))</SCRIPT>\n'); if (result) return name+','; else return ''; }
function detectNS(ClassID,name) { n = ""; if (nse.indexOf(ClassID) != -1) if (navigator.mimeTypes[ClassID].enabledPlugin != null) n = name+","; return n; }

pluginlist += navigator.javaEnabled() ? "Java," : "";
if (pluginlist.length > 0) pluginlist = pluginlist.substring(0,pluginlist.length-1);


// Code and all web content for Bartram Enterprises:Property is copyright G.Bartram (c) 2008

function OutputLogo()
{
    var outputString = '<td width="292px" style="background: url(images/6bgr_2.jpg) left top no-repeat;">';
    outputString += '<a href="default.htm"><img src="images/logo.jpg" alt="" border="0" style="margin: 28px 0 0 60px;" /></a>';
    outputString += '</td>';
    return outputString;
}

function OutputMenus()
{
    var outputString = '<table style="height: 83px;" border="0" cellspacing="0" cellpadding="0">';
    outputString += '<tr>';
    outputString += '<td>';
    outputString += '<a href="default.htm"><img src="images/m1.jpg" alt="" border="0" style="margin-top: 30px;" /></a>';
    outputString += '<a href="aboutflash.htm"><img src="images/m3.jpg" alt="" border="0" /></a>';
    outputString += '<a href="sellingflash.htm"><img src="images/m4.jpg" alt="" border="0" /></a>';
    outputString += '<a href="contactflash.htm"><img src="images/m5.jpg" alt="" border="0" /></a>';
    outputString += '</td>';
    outputString += '</tr>';
    outputString += '</table>';
    return outputString;
}


// Show the hand as we're over a link or menu
// Params:  htmlElement - object to show hand (if none, uses srcElement)
// Returns: none
function MouseHover(theEvent)
{
	var evt = (window.event) ? window.event : theEvent;	
	if (IE)
	{
		var htmlElement = evt.srcElement;
	}
	else
	{
		var htmlElement = evt.target;
	}
	if (htmlElement.className != 'menutextselected')
	{
		htmlElement.style.cursor = 'pointer';
		htmlElement.style.color = '#009933';
	}
}

function MouseOut(theEvent)
{
	var evt = (window.event) ? window.event : theEvent;	
	if (IE)
	{
		var htmlElement = evt.srcElement;
	}
	else
	{
		var htmlElement = evt.target;
	}

	htmlElement.style.cursor='default';
	
	if (htmlElement.className != 'menutextselected')
	{
		htmlElement.style.color = '#dddddd';
	}
}

function LoadApp(path)
{
    if (document.getElementById('choice').checked == true)
    {
        setCookie('choice', path, 999);
    }
    else
    {
        delCookie('choice');
    }

    window.location=path;
}


function checkCookieExists(NameofCookie)
{
    if (document.cookie.length > 0)
    {
        return document.cookie.indexOf(NameofCookie+"=");
    }
}

function getCookie(NameOfCookie)
{

    if (document.cookie.length > 0) 
    { 
        begin = document.cookie.indexOf(NameOfCookie+"="); 
        if (begin != -1) // Note: != means "is not equal to"
        { 

            begin += NameOfCookie.length+1; 
            end = document.cookie.indexOf(";", begin);
            if (end == -1) end = document.cookie.length;
            {
                return unescape(document.cookie.substring(begin, end)); 
            } 
        }
    }
    return null; 

} 

function setCookie(NameOfCookie, value, expiredays) 
{

    var ExpireDate = new Date ();
    ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

    document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

 
function delCookie (NameOfCookie) 
{

    if (getCookie(NameOfCookie)) 
    {
        document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
}
 
 

