// LEC's Common JavaScript
// By: BBBertram - LEC Webmaster

// Opens new specific sized window
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=0,scrollbars=yes,menubar=no' );
}

// Application version check for Internet Explorer & Netscape
var appver = window.navigator.appVersion;
if (appver.length > 6)		//if null due to dual boot system or faulty install
var findit = appver.indexOf("MSIE");
if ((appver =="")||(findit >= 0))
		appver = "MSIE";
		else
		appver ="NET";

// Mouseover function for menu images

if (document.images)
			{    
		
		homeon = new Image;
		homeon.src = "images/CCN_home_over.gif";
		homeoff = new Image;
		homeoff.src = "images/CCN_home.gif";
		homepress = new Image;
		homepress.src = "images/CCN_home_page.gif";
		
		abouton = new Image;
		abouton.src = "images/btn_aboutccn_over.gif";
		aboutoff = new Image;
		aboutoff.src = "images/btn_aboutccn.gif";
		aboutpress = new Image;
		aboutpress.src = "images/btn_aboutccn_page.gif";
		
		bbon = new Image;
		bbon.src = "images/btn_bboard_over.gif";
		bboff = new Image;
		bboff.src = "images/btn_bboard.gif";
		bbpress = new Image;
		bbpress.src = "images/btn_bboard_page.gif";
		
		chapteron = new Image;
		chapteron.src = "images/btn_chaptertitles_over.gif";
		chapteroff = new Image;
		chapteroff.src = "images/btn_chaptertitles.gif";
		chapterpress = new Image;
		chapterpress.src = "images/btn_chaptertitles_page.gif";
		
		poweron = new Image;
		poweron.src = "images/btn_powerteaching_over.gif";
		poweroff = new Image;
		poweroff.src = "images/btn_powerteaching.gif";
		powerpress = new Image;
		powerpress.src = "images/btn_powerteaching_page.gif";		

		infoon = new Image;
		infoon.src = "images/btn_inforequest_over.gif";
		infooff = new Image;
		infooff.src = "images/btn_inforequest.gif";
		infopress = new Image;
		infopress.src = "images/btn_inforequest_page.gif";

      }
		
		
var thisPage = "";

function setCurrent(page){

	img_press(page);
	thisPage = page;
	
}

function img_act(imgName)
{
    if (document.images)
    {
        imgOn = eval(imgName + "on.src");
		imgPress = eval(imgName + "press.src");
		imgSrc = document [imgName].src;
		if (imgSrc != imgPress && imgName != thisPage){
			document [imgName].src = imgOn;
		}
        
    }
}

function img_inact(imgName)
{
    if (document.images && imgName != thisPage)
    {
        imgOff = eval(imgName + "off.src");
        document [imgName].src = imgOff;
    }
}

function img_press(imgName)
{
    if (document.images && imgName != thisPage)
    {
        imgPress = eval(imgName + "press.src");
        document [imgName].src = imgPress;
    }
}

function message (text)    
{
    if (document.images)
    {
        window.status = text;
    }
}

function remove ()    
{
    if (document.images)
    {
    window.status = "3B Web Creations";
    }
}

