﻿/*********************************************************************************************/
 
function rollOver(imageTagName, imageFileName)
{
  document.images[imageTagName].src=imageFileName;
}
 

        /*********************************************************************************************
                Preload images for Navigation rollovers
        *********************************************************************************************/
 
        var imagePath = "/Images/mystorymyall/navigation/";
       
        /* Top Nav - Wynonna Top Nav */
        home_On = new Image();
        home_On.src = imagePath + "navHome.gif";
        home_Off = new Image();
        home_Off.src = imagePath + "navHomeOver.gif"; 
 
        myStory_On = new Image();
        myStory_On.src = imagePath + "navMystoryOver.gif";
        myStory_Off = new Image();
        myStory_Off.src = imagePath + "navMystory.gif";
 
        myAlli_On = new Image();
        myAlli_On.src = imagePath + "navMyalliOver.gif";
        myAlli_Off = new Image();
        myAlli_Off.src = imagePath + "navMyalli.gif";

        myCircle_On = new Image();
        myCircle_On.src = imagePath + "navMycircleOver.gif";
        myCircle_Off = new Image();
        myCircle_Off.src = imagePath + "navMycircle.gif";
        
        myMusic_On = new Image();
        myMusic_On.src = imagePath + "navMymusic.gif";
        myMusic_Off = new Image();
        myMusic_Off.src = imagePath + "navMymusicOver.gif";
        
        myTour_On = new Image();
        myTour_On.src = imagePath + "navOntour.gif";
        myTour_Off = new Image();
        myTour_Off.src = imagePath + "navOntourOver.gif";
        
        /*Alli Access Links*/
        myWallpaper_On = new Image();
        myWallpaper_On.src = imagePath + "tabWallpaperOn.png";
        myWallpaper_Off = new Image();
        myWallpaper_Off.src = imagePath + "tabWallpaperOff.png";
        
        downloads_On = new Image();
        downloads_On.src = imagePath + "tabDownloadsOn.png";
        downloads_Off = new Image();
        downloads_Off.src = imagePath + "tabDownloadsOff.png";
        
        recipes_On = new Image();
        recipes_On.src = imagePath + "tabRecipesOn.png";
        recipes_Off = new Image();
        recipes_Off.src = imagePath + "tabRecipesOff.png";
        
var bName = navigator.appName;

function limitText(limitField, limitCharacters)
{
    if (limitField.value.length >= limitCharacters) 
	{
	    return false;
	}
	return true;
}
        
function displayCharsLeft(limitField, displayFieldName, limitCharacters) 
{
  
    var objCnt = createObject(displayFieldName);
    if (limitField.value.length > limitCharacters){
        limitField.value = limitField.value.substring(0, limitCharacters);
    }
    
	if (objCnt) {
		if(bName == "Netscape"){	
			objCnt.textContent = limitCharacters - limitField.value.length;
		}
		else{
		    objCnt.innerText = limitCharacters - limitField.value.length;
		}
	}
}

function createObject(objId) {
	if (document.getElementById){
	    return document.getElementById(objId);
	}
	else if (document.layers){
	    return eval("document." + objId);
	}
	else if (document.all){
	    return eval("document.all." + objId);
	}
	else{
	    return eval("document." + objId);
	}
}