﻿// paging types for gallery
var enuPagingType_None = 0;
var enuPagingType_Single = 1;
var enuPagingType_Full = 2;

// view types for photo viewers
var enuViewType_None = 0;
var enuViewType_FilmStrip = 1;
var enuViewType_Paged = 2;
var enuViewType_AspectLeft = 3;

// image types for photo viewers
var enuImageTypeId_Small = 10;
var enuImageTypeId_Aspect = 12;
var enuImageTypeId_MediumAspect = 13;

var enuCSSType_Id = 1;
var enuCSSType_Class = 2;

// cookies used
// photo enhancement message
var constShowPEMsg = "showPEMsg";

// photo cropping message
var constShowCropMsg = "showCropMsg";

// photo rotate message
var constShowRotateMsg = "showRotateMsg";

// photo upload message
var constShowRotateMsg = "showUploadMsg";

// captcha 
var constCaptcha = "SecurityCode";

// last image that was selected
var constSaveLastImage = "pixLastImage";

// scroll back position for popup close window
var m_scrollBackPosition = 0;

// Gets a DOT Net element by name.  type = input, img, etc
// getLastElement will find the last instance when doing a wild card search
function getDOTNETElementByFieldName(type, fieldName, getLastElement)
{
    var items = document.getElementsByTagName(type)
    var e = null;
    for (var i = 0, n = items.length; i < n; i++) 
    {
        var identifier = trim(items[i].getAttribute('id'))
        if (identifier != null && identifier.length > 0)
        {
            if (identifier.indexOf(fieldName) != -1)
            {
               e = document.getElementById(identifier);
               if (getLastElement == null || getLastElement == false)
                    return e;
            }
        }

    }
    
    return e;
			
}

function ClipBoard(textarea) 
{
    Copied = textarea.createTextRange();
    Copied.execCommand("RemoveFormat");
    Copied.execCommand("Copy");
}
   
function trim (text) 
{
	if (text == null) return null
	return text.replace(/^(\s+)?(.*\S)(\s+)?$/, '$2')
}

function getQueryStringVariable(variable) 
{
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) 
  {
    var pair = vars[i].split("=");
    if (pair[0].toLowerCase() == variable.toLowerCase()) 
    {
      return pair[1];
    }
  }
  return null;
} 

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1; 
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    } 
  }
return "";
}

// PixPlugImage class to parse our formated Img tag id value.
// This will retreive the values embedded in the element id value
// The format = "IMG-[AlbumId]-[ImageId]"
function PixPlugImage(elementId) 
{
    this._AlbumId = elementId.split('-')[1];
    this._ImageId = elementId.split('-')[2];
}

PixPlugImage.prototype._AlbumId;
PixPlugImage.prototype._ImageId;

PixPlugImage.prototype.getAlbumId = function() 
{
    return this._AlbumId;
}
PixPlugImage.prototype.getImageId = function() 
{
    return this._ImageId;
}
PixPlugImage.prototype.toString = function() 
{
    return BuildImageElement(this._AlbumId,this._ImageId);
}

function BuildImageElement(albumid,imageid)
{
    return "IMG-" + albumid + "-" + imageid;
}


// END PixPlugImage

function setLastPixPlugImage(element)
{
    setCookie(constSaveLastImage, element.id,1);
}

function getLastPixPlugImage()
{
    var a = getQueryStringVariable("albumid");
    var e = getCookie(constSaveLastImage);
    if (e != null)
    {
        if (e.length > 0)
        {        
            var i = new PixPlugImage(e);
            if (i != null)
            {
                if (i.getAlbumId() == a)
                    return i;
            }
        }
    }
    return null;
}

// Return inner page size of the page
function getPageSize()
{
    var windowWidth, windowHeight;
	
	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	
	return [windowWidth,windowHeight];
}

// Returns page size unless the page is smaller than the browser window, in which case it returns the browser window size
function getPageWidth()
{
    var xScroll, yScroll;

    if (window.innerHeight && window.scrollMaxY) {	
	    xScroll = window.innerWidth + window.scrollMaxX;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
	    xScroll = document.body.scrollWidth;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	    xScroll = document.body.offsetWidth;
    }

    var windowWidth;

    if (self.innerHeight) {	// all except Explorer
	    if(document.documentElement.clientWidth){
		    windowWidth = document.documentElement.clientWidth; 
	    } else {
		    windowWidth = self.innerWidth;
	    }
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	    windowWidth = document.documentElement.clientWidth;
    } else if (document.body) { // other Explorers
	    windowWidth = document.body.clientWidth;
    }	

    // for small pages with total width less then width of the viewport
    if(xScroll < windowWidth){	
	    pageWidth = xScroll;		
    } else {
	    pageWidth = windowWidth;
    }

    return pageWidth;

}

// Returns page size unless the page is smaller than the browser window, in which case it returns the browser window size
function getPageHeight()
{
    var yScroll;

    if (window.innerHeight && window.scrollMaxY) {	
	    yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
	    yScroll = document.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	    yScroll = document.body.offsetHeight;
    }

    var windowHeight;

    if (self.innerHeight) {	// all except Explorer
	    windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	    windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
	    windowHeight = document.body.clientHeight;
    }	

    // for small pages with total height less then height of the viewport
    if(yScroll < windowHeight){
	    pageHeight = windowHeight;
    } else { 
	    pageHeight = yScroll;
    }

    return pageHeight;
}

// Gives you the size of the browser (not the page) exluding the scroll bar (if there is one)
function getWindowWidth()
{
   var windowWidth = 0;
   if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
	}
	return windowWidth;
}

// Gives you the size of the browser (not the page) excluding the scroll bar (if there is one)
function getWindowHeight()
{
    var windowHeight = 0;
    if (self.innerHeight) {	// all except Explorer
	    windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
	    windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { // other Explorers
	    windowHeight = document.body.clientHeight;
    }
    return windowHeight;
}


function getAlbumsPageNumberOfImages(hasAlbumInfo, imageTypeId)
{
    // set some knowns and defaults
    var padding = 117;  // 58 on one side, 59 on the other
    var albumInfoWidth = 252;  // albuminfo size plus a pad
    var ww = getWindowWidth();
    var imageSize = 125; // div holding image size
    var numberOfImages = 0;
    var imagePadding = 14; //14 pixels between each image area
    
    if (imageTypeId == 13)
        imageSize = 164 + imagePadding;
    
    ww += imagePadding; // To account for the padding that isn't needed after the last photo
    ww -= padding;
    
    if (hasAlbumInfo)
        ww = ww - albumInfoWidth;
        
    if (ww <=1)
        return 3;
                    
    numberOfImages = Math.floor(ww/imageSize);   
      
    if (imageTypeId == 12)
    {        
        if (numberOfImages <= 1)
            return 3; 

        if (numberOfImages < 6 && hasAlbumInfo)
            return 15;
                                         
        if (numberOfImages < 7 && !hasAlbumInfo)
            return 18;
            
        // always mutiply by 3 b/c we fix it to 3 rows.
        return numberOfImages * 3;
            
    }
     
    if (imageTypeId == 13)
    {        
        if (numberOfImages <= 1)
            return 2; 
            
        return numberOfImages * 2    
            
    }     
            
}

function getAlbumManagerPageNumberOfImages()
{
    // set some knowns and defaults
    var padding = 40;  // 58 on one side and at least 27 on the other
    var albumControlsWidth = 238;  // Size of album manager control panel (for now)
    var ww = getWindowWidth();//1021
    var numberOfImages = 0;

    // It always uses imageTypeId = 13 (for now anyway)
    var imagePadding = 14; // between each picture
    var imageSize = 164 + imagePadding; // 164 for photo area and 7 padding on each side
    
    ww += 7;  // To account for the padding that isn't needed after the last photo
    
    ww -= padding;
    
    ww -= albumControlsWidth;
        
    if (ww <=1) //dont get this, why 3?
        return 3;

    numberOfImages = Math.floor(ww/imageSize);   
      
    if (numberOfImages <= 1)
        return 2; 
    
    // Always wants 2 rows    
    return numberOfImages * 2    
        
}

function getAlbumsPageThumbAreaWidth(hasAlbumInfo)
{
    var padding = 140;  // 70 on each side
    var albumInfoWidth = 262;  // albuminfo size plus a pad
    var ww = getWindowWidth();
    var imageSize = 125; // div holding image size
    var numberOfImages = 0;
    alert(ww);
    ww = ww - padding;
    
    if (hasAlbumInfo)
        ww = ww - albumInfoWidth;
            
    return ww;
}



function getImageTypeIdForWindowSize()
{
    // NOTE:  Change the values below if the desired sizes change.
    var fullScreen = 2; // 1024x768 - good for 
    var large = 3;  // 800x600 - good for between 1100 
    var medium = 4; // 550x413 - good for above 800x600 but still below 1024
    var small = 5;  // 400x300 - good for 800x600 and below
    
    // The image starts at 50 and needs about 350 pixels for the side photo info
    
    var ww = getWindowWidth();
    if (ww>0) 
    {
        if (ww<800)
            return small;
        if (ww>1450)
            return fullScreen;
        else if (ww>1175) 
            return large;
        else 
            return medium;
    }

}


function parseXML(text)
{
   if (typeof DOMParser != "undefined") 
   { 
       // Mozilla, Firefox, and related browsers 
        return (new DOMParser()).parseFromString(text, "text/xml"); 
    } 
    else if (typeof ActiveXObject != "undefined") 
    { 
      // Internet Explorer. 
      var doc=new ActiveXObject("Microsoft.XMLDOM");
      doc.async="false";
      doc.loadXML(text); 
      return doc;             
    } 
    else
    {
        alert('Your browser is not supported.');
    }
}

function getXMLElementValue(doc, elementName)
{
    if (doc.getElementsByTagName(elementName)[0] != null)
    {
        if (doc.getElementsByTagName(elementName)[0].childNodes.length > 0)
            return doc.getElementsByTagName(elementName)[0].childNodes[0].nodeValue;
        else
            return "&nbsp;";
    }
    
   return "&nbsp;";
}

function getXMLElement(doc, elementName)
{
    if (doc.getElementsByTagName(elementName)[0] != null)
    {
        return doc.getElementsByTagName(elementName)[0];
    }
    
   return null;
}


function setInnerHTMLFromXML( xmlDoc, element)
{
    if (document.getElementById(element) != null && document.getElementById(element) != 'undefined')
    {
        var xmlValue = getXMLElementValue(xmlDoc,element);
        document.getElementById(element).innerHTML = xmlValue; 
        if(xmlValue != "&nbsp;")
            return true;               
    }
    return false;
}


// FLASH DETECTIOM
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	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 flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;			
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
			var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}


function ShowHideLoader(show)
{
    var loader = document.getElementById('loaderImage');
    if (loader!=null && loader != 'undefined')
    {
        if (show)
            loader.style.display="block"
        else
            loader.style.display="none"    
    }

}


function ShowHideLoaderDelay(delay)
{
    
    var loader = document.getElementById('loaderImage');
    if (loader!=null && loader != 'undefined')
    {
        ShowHideLoader(true);        
        if (delay != null && delay != undefined)
            setTimeout("ShowHideLoader(false)", delay);
        else
            setTimeout("ShowHideLoader(false)", 2000);            
    }

}


function ImagePreloader(images, callback)
{
   // store the call-back
   this.callback = callback;
   // initialize internal state.
   this.nLoaded = 0;
   this.nProcessed = 0;
   this.aImages = new Array;
   // record the number of images.
   this.nImages = images.length;
   // for each image, call preload()
   for ( var i = 0; i < images.length; i++ )
   {
      this.preload(images[i]);
   }
   
}

ImagePreloader.prototype.preload = function(image)
{
   // create new Image object and add to array
   // Have to use doc.createElement so it will work on OSX Safari
   var oImage = document.createElement('img');//new Image();
   this.aImages.push(oImage);

   // set up event handlers for the Image object
   oImage.onload = ImagePreloader.prototype.onload;
   oImage.onerror = ImagePreloader.prototype.onerror;
   oImage.onabort = ImagePreloader.prototype.onabort;

   // assign pointer back to this.
   oImage.oImagePreloader = this;
   oImage.bLoaded = false;

   // assign the .src property of the Image object
   oImage.src = image;
}


ImagePreloader.prototype.onComplete = function()
{
   this.nProcessed++;
   if ( this.nProcessed == this.nImages )
   {     
     this.callback(this.aImages, this.nLoaded);
   }
}

ImagePreloader.prototype.onload = function()
{
    this.bLoaded = true;
    this.oImagePreloader.nLoaded++;
    this.oImagePreloader.onComplete();
}

ImagePreloader.prototype.onerror = function()
{

   this.bError = true;
   this.oImagePreloader.onComplete();
}

ImagePreloader.prototype.onabort = function()
{
   this.bAbort = true;
   this.oImagePreloader.onComplete();
}

function getSWF(movieName) 
{
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    }
    else {
      if(document[movieName].length != undefined){
          return document[movieName][1];
      }
        return document[movieName];
    }
}

// override on your page if you need to.
var pixNotSelected = "ToolPhoto";
var pixSelected = "ToolPhotoSelected";
var pixHover = "ToolPhotoHover";

function doMouseOut(element)
{    
    if (element != null)
    {
        if (element.className == null || element.className != pixSelected)
        {                                         
            element.className=pixNotSelected
            
            if (element.getAttribute("pn") != null)
            {
                var pnDiv = element.getAttribute("pn");
                if (document.getElementById(pnDiv) != null)
                    document.getElementById(pnDiv).style.display='none';            
            }    
            
        }
    }
}

function doMouseOver(element)
{
    if (element != null)
    {
        if (element.className == null || element.className != pixSelected)
        {
            element.className=pixHover
            
            if (element.getAttribute("pn") != null)
            {
                var pnDiv = element.getAttribute("pn");
                if (document.getElementById(pnDiv) != null)
                    document.getElementById(pnDiv).style.display='block';
            }
        }
    }
}

function doUnSelect(element)
{
    if (element != undefined)
    {
        element.className = pixNotSelected
        if (element.getAttribute("pn") != null)
        {
            var pnDiv = element.getAttribute("pn");
            if (document.getElementById(pnDiv) != null)
                document.getElementById(pnDiv).style.display='none';
        }    
    }
}

function doSelect(element)
{
    if (element != undefined)
    {
        element.className = pixSelected
        
        if (element.getAttribute("pn") != null)
        {
            var pnDiv = element.getAttribute("pn");
            if (document.getElementById(pnDiv) != null)
                document.getElementById(pnDiv).style.display='block';        
        }    
    }
}


// Start of Save Apply Hide and Show Div on Album and Site Managers

function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	// Fade Out
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "', true)",(timer * speed));
			timer++;
		}
	}
	// Fade In
	 else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++)
			{
			setTimeout("changeOpac(" + i + ",'" + id + "', false)",(timer * speed));
			timer++;
		}
	    setTimeout("opacity('applyChanges', 100, 0, 500)",1500);
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id, isRemoving) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
	if (isRemoving && opacity == 0){
	    document.getElementById(id).style.display = "none";	
	}
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	document.getElementById(id).style.display = "block";
	if(document.getElementById(id).style.opacity == 100) {
		opacity(id, 100, 0, millisec); 
	} else {
		opacity(id, 0, 100, millisec);
	}
}

function ShowStatus()
{
    shiftOpacity('applyChanges', 500)
    var back = document.getElementById("backToPage");
    if (back != null)
        back.style.display = "block";
    
}	

// End of Save Apply Hide and Show Div on Album and Site Managers

// Tour Mouseover Menu
function tourOver(imageName, elName)
{
    var myEl = document.getElementById(elName).src = "/i/tour/" + imageName;

}

// Tour Mouseout Menu
function tourOut(imageName, elName)
{
    document.getElementById(elName).src = "/i/tour/" + imageName;

}

// Tour Mousedown Selected Item
function tourActive(imageName, elName, linkButton) 
{
    document.getElementById(elName).src = "/i/tour/" + imageName;
    alert(elName);
}

// This is the pop up window //

    // Show theme preview
    function Preview(url, name, pageNumber, popupNumber)
    {
         var arrayPageSize = this.getPageSize();
         var windowWidth = arrayPageSize[0];
         var windowHeight = arrayPageSize[1];
        
         // get position of scrollbar 
         m_scrollBackPosition = document.documentElement.scrollTop;
        
        // hide scrollbar
        document.body.style.overflow = 'hidden';    // every browser accept ie
        document.body.scroll = 'no';                // ie
        
         // Position the left and top position for the tray
         leftPosition = (windowWidth / 2) - 437;
         topPosition = (windowHeight / 2) - 282;

         // Show and Position tray in the center horizontal and vertical
	     document.getElementById("themePreview").style.display = "block";
	     document.getElementById("themeTray").style.display = "block";
	     
	     // Check to see the window size so we can position correctly
	     if((topPosition > 0) && (leftPosition > 0))
         {
            document.getElementById("themeTray").style.top = topPosition + "px";
            document.getElementById("themeTray").style.left = leftPosition + "px";
         }
         else if((topPosition < 0) && (leftPosition > 0))
         {
            document.getElementById("themeTray").style.top = "10px";
            document.getElementById("themeTray").style.left = leftPosition + "px";
	     }
	     else if((topPosition > 0) && (leftPosition < 0))
	     {
	        document.getElementById("themeTray").style.top = topPosition + "px";
            document.getElementById("themeTray").style.left = "0px";
	     }
	     else
	     {
	        document.getElementById("themeTray").style.top = "10px";
            document.getElementById("themeTray").style.left = "0px";
	     }
	     
	     // Put image in the correct div
	     document.getElementById("themeImage").src = url;
	     document.getElementById("themeImage").setAttribute('alt', name);
	     window.scrollTo(0,0);
	    
	    // method to get title and content text 
        GetPopTextTitle(pageNumber, popupNumber);
		
    }
    
    // close the preview window
    function closePreview()
    {
        document.getElementById("themePreview").style.display = "none";
	    document.getElementById("themeTray").style.display = "none";
	    
	    document.getElementById("themeImage").src = "/i/transparent.gif";
	    document.getElementById("themeImage").setAttribute('alt', "");
	    
	    // show scrollbar
	    document.body.style.overflow = "";  // every browser accpet ie
	    document.body.scroll = 'yes';       //ie to show scrollbar
	    
	    // scroll back to the position from where user clicked image
	    window.scrollTo(0, m_scrollBackPosition);
	    
    }
    
    // when the window resizes
    window.onresize = function()
    {
        
         var arrayPageSize = this.getPageSize();
         var windowWidth = arrayPageSize[0];
         var windowHeight = arrayPageSize[1];
        
         // Position the left and top position for the tray
         leftPosition = (windowWidth / 2) - 437;
         topPosition = (windowHeight / 2) - 282 + 9;
         
         // Check to see the window size so we can position correctly
         if((topPosition > 0) && (leftPosition > 0))
         {
            document.getElementById("themeTray").style.top = topPosition + "px";
            document.getElementById("themeTray").style.left = leftPosition + "px";
         }
         else if((topPosition < 0) && (leftPosition > 0))
         {
            document.getElementById("themeTray").style.top = "10px";
            document.getElementById("themeTray").style.left = leftPosition + "px";
	     }
	     else if((topPosition > 0) && (leftPosition < 0))
	     {
	        document.getElementById("themeTray").style.top = "10px";
            document.getElementById("themeTray").style.left = "0px";
	     }
	     else
	     {
	        document.getElementById("themeTray").style.top = "10px";
            document.getElementById("themeTray").style.left = "0px";
	     }
	      
    }
    
 // get the title and text for the pop-up
 function GetPopTextTitle(pageNumber, popupNumber)
 {
    if(pageNumber == 1)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "Pixplug Photo Enhancements";
            document.getElementById("ContentText").innerHTML = "Pixplug offers thousands of creative photo enhancements and visual effects you can apply instantly with one-click using your browser. It’s fast, easy and makes your photo look great in seconds!";
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Photo Edges and Frames";
            document.getElementById("ContentText").innerHTML = "Add stylish photo edges and artistic frames that wrap around your photo and give them a unique artistic look.";
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Lighting and Shading";
            document.getElementById("ContentText").innerHTML = "Add streaming sunshine, naturally brighten and add light to your photos as well as shading to give the image additional contrast. These enhancements are awesome!";
        }
        else if(popupNumber == 4)
        {
            document.getElementById("TopBarTitle").innerHTML = "Color Enhancements";
            document.getElementById("ContentText").innerHTML = "Create rich tonal contrasting black-and-white images, color tints, sepia tones, deepen the tones and make your colors extra vibrant.";
        }
        else if(popupNumber == 5)
        {
            document.getElementById("TopBarTitle").innerHTML = "Text Effects on Photos";
            document.getElementById("ContentText").innerHTML = "Choose from hundreds of different type faces and styles of effects, colors and looks. Place the text over your photo and rotate and scale it just like you want.";
        }
        else if(popupNumber == 6)
        {
            document.getElementById("TopBarTitle").innerHTML = "Dreamy Soft Focus Effects";
            document.getElementById("ContentText").innerHTML = "Selectively add a focal effect to your image to draw attention to the subject and to blur out the background behind the subject. These are great for adding a professional styled effect to your images.";
        }
        else if(popupNumber == 7)
        {
            document.getElementById("TopBarTitle").innerHTML = "Improve Dark Photos";
            document.getElementById("ContentText").innerHTML = "Improve low-light, under-exposed shots with ease. These enhancements bring out the detail and expand the tonal gamut of your images to reveal hidden detail and improve low-light shots.";
        }
        else if(popupNumber == 8)
        {
            document.getElementById("TopBarTitle").innerHTML = "Photo Enhancement Interface";
            document.getElementById("ContentText").innerHTML = "To apply photo enhancements to your photo all you have to do is choose the type from the menu and then click the visual sample you want to have applied to your photo. It’s that easy! Your preview updates in seconds. You can apply the enhancement to the original photo or apply it to a copy and keep your original image untouched.";
        }
    }// End if Page 1
    else if(pageNumber == 2)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "Slideshows and Photo Presentations";
            document.getElementById("ContentText").innerHTML = "Pixplug offers you more than 600 creative ways to present your photos using slideshows and photo shows. These interactive presentations have easy to use controls to navigate and view the images and include dozens of creative transition controls.";
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Interactive Presentations";
            document.getElementById("ContentText").innerHTML = "Whether you want to show a rotating carousel or a spinning 3D photo cube, the interactive presentations category has a wealth of creative options to choose from.";
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Natural Media Shows";
            document.getElementById("ContentText").innerHTML = "This category of presentation includes dozens of hand-painted natural media frames and borders that surround your images. Watercolors, acrylics, oils, pastels and other mixed-media techniques were used to create these shows.";
        }
        else if(popupNumber == 4)
        {
            document.getElementById("TopBarTitle").innerHTML = "Scrapbook Style Shows";
            document.getElementById("ContentText").innerHTML = "These presentations are really cute and are ideal for family fun. Using scrapbook themes and designs, these slideshows offer you some great creative choices";
        }
        else if(popupNumber == 5)
        {
            document.getElementById("TopBarTitle").innerHTML = "Title Slides and Credits";
            document.getElementById("ContentText").innerHTML = "Using the photo enhancement tools you can easily generate custom title slides and credit pages for your slideshows. This is a great way to introduce your show to your viewers and to give credit where it’s due!";
        }
        else if(popupNumber == 6)
        {
            document.getElementById("TopBarTitle").innerHTML = "Storyboard Shows";
            document.getElementById("ContentText").innerHTML = "Using the Pixtivity Special Edition software that is included with the Premium and Professional accounts, you can generate custom storyboards that display multiple photos at the same time and rotate them so you get different combinations showing at all times. Very cool and very easy to make!";
        }
        else if(popupNumber == 7)
        {
            document.getElementById("TopBarTitle").innerHTML = "Professional Slideshows";
            document.getElementById("ContentText").innerHTML = "You can assign any slideshow you like to an album and when your visitor wants to view the photos they see it in the slideshow you have picked. The controls for the slideshows have small thumbnails, pause and play controls, back and forward controls as well as speed controls. The controls hide when the cursor is not over the slideshow.";
        }
        else if(popupNumber == 8)
        {
            document.getElementById("TopBarTitle").innerHTML = "Easily Preview and Apply Presentations";
            document.getElementById("ContentText").innerHTML = "You can preview any of the presentations before you apply it. With a single click you can change the slideshow that is associated with your album. Change this as often as you like!";
        }
    }// End if Page 2
    else if(pageNumber == 3)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "Personalized Homepage and Site";
            document.getElementById("ContentText").innerHTML = "Pixplug gives you a custom site with your membership. There are hundreds of creative themes you can instantly apply to your entire site with a single click (no coding or html knowledge required!).";
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Professional Themes";
            document.getElementById("ContentText").innerHTML = "A large number of our themes are made with a clean, polished professional appearance. Professional members can customize the colors, features and text throughout the themes and can even add your own logo, watermark photos and use your own website domain name.";
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Use Your Own Photo";
            document.getElementById("ContentText").innerHTML = "Many of the themes we’ve created are what we call ‘photo-friendly’ and allow you to add your own images into the theme itself. You can literally replace our images with yours. We even give you the online tools to crop and select the parts of your image that fit the theme.";
        }
        else if(popupNumber == 4)
        {
            document.getElementById("TopBarTitle").innerHTML = "Sports and Recreation";
            document.getElementById("ContentText").innerHTML = "We have a large selection of themes to choose from, including sports themes like baseball, football, basketball, soccer and more!";
        }
        else if(popupNumber == 5)
        {
            document.getElementById("TopBarTitle").innerHTML = "Shaped Designs";
            document.getElementById("ContentText").innerHTML = "Many of the Pixplug themes are created with artistic shapes and colors that make your site really stand-out and look fabulous. You can even put your own photo into these shaped themes (replace the goldfish in the example below with your own image, for example).";
        }
        else if(popupNumber == 6)
        {
            document.getElementById("TopBarTitle").innerHTML = "Customize Colors";
            document.getElementById("ContentText").innerHTML = "Color is very subjective so we’ve made is super easy to click and change the colors throughout your Pixplug site. Our easy-to-use color picker pops-up and lets you select the color that you want for things like the background, the text, links, etc …";
        }
        else if(popupNumber == 7)
        {
            document.getElementById("TopBarTitle").innerHTML = "Fun and Whimsical";
            document.getElementById("ContentText").innerHTML = "While we offer lots of professional designs we also provide a bunch of fun and playful designs to choose from.";
        }
        else if(popupNumber == 8)
        {
            document.getElementById("TopBarTitle").innerHTML = "Easily Preview and Apply Themes";
            document.getElementById("ContentText").innerHTML = "Applying a theme to your site is as easy as picking a design you like then clicking the Apply button beneath it. That is all it takes – every page in your site will update to show the new theme. Change your theme as often as you like.";
        }
    }// End if Page 3
    else if(pageNumber == 4)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "Organize, Manage and Edit";
            document.getElementById("ContentText").innerHTML = "With Pixplug you can manage your photos using the Album Manager or directly from the Album Viewer (shown below). This gives you a fast and easy way to modify your pictures and see the changes instantly.";
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Easily Organize Photos";
            document.getElementById("ContentText").innerHTML = "Pixplug makes it easy to arrange and edit your photos. Simply click to select photos then drag-and-drop them in the order you want them displayed in.";
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Powerful Editing Tools";
            document.getElementById("ContentText").innerHTML = "Pixplug includes a full suite of tools to make editing and enhancing your photos online a simple and fun experience.";
        }
        else if(popupNumber == 4)
        {
            document.getElementById("TopBarTitle").innerHTML = "Batch Rotate Multiple Photos";
            document.getElementById("ContentText").innerHTML = "Click and select multiple photos that need to be rotated in the same direction and then click a single button and you can rotate dozens and dozens of photos at a time. This is a huge time-saver!";
        }
        else if(popupNumber == 5)
        {
            document.getElementById("TopBarTitle").innerHTML = "Fast Photo Uploaders";
            document.getElementById("ContentText").innerHTML = "Our photo-uploaders are FAST and built to handle hundreds of photos at a time so you can take large amounts of images from your computer / camera and upload them in a single session. We have stand-alone applications too for Mac and Windows as well as web browser based upload pages. We also have plug-ins that do uploads from iPhoto, Apple Aperture and Adobe Photoshop products.";
        }
        else if(popupNumber == 6)
        {
            document.getElementById("TopBarTitle").innerHTML = "Privacy for Albums / Site";
            document.getElementById("ContentText").innerHTML = "You can make your entire site private or you can make specific albums private. Once private, a user must have permission to access your site / album in order to view or contribute to it (you decide the permissions you want to give your members).";
        }
        else if(popupNumber == 7)
        {
            document.getElementById("TopBarTitle").innerHTML = "Download Entire Albums";
            document.getElementById("ContentText").innerHTML = "Your visitors can download (with your permission) entire albums of photos in a single click. This makes it super-easy to share your photos with family and friends. Visitors can also download individual photos as well.";
        }
        else if(popupNumber == 8)
        {
            document.getElementById("TopBarTitle").innerHTML = "Album Manager Features";
            document.getElementById("ContentText").innerHTML = "The Album Manager lets you edit all the photos in your album with ease. You can do batch operations like moving photos or copying them from one album to another.";
        }
    }// End if Page 4
    else if(pageNumber == 5)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "Create Price List";
            //document.getElementById("ContentText").innerHTML = "This is just one of the dozens of different styled album themes and viewer layouts offered by Pixplug. The Album Viewer lets you showcase your images, accept comments, share, viewers can download images, see them in slideshows or if they have your permission, add photos to your albums as a contributor.";
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Assign Price List";
            //document.getElementById("ContentText").innerHTML = "The Album Viewer is built smart so that the images will automatically increase in size to display as large as possible depending on the viewers display and browser window size. Smart navigation features let the user change images with a single click of the mouse or advance the album view using the arrow keys on their keyboard (left and right arrows).";
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Orders Page";
            //document.getElementById("ContentText").innerHTML = "Pixplug lets you invite friends to join your site and upload photos to albums you make for them or allow them to have access to. This is a great way to share photos taken at a common event (like a game or wedding everyone attended).";
        }
        else if(popupNumber == 4)
        {
            document.getElementById("TopBarTitle").innerHTML = "Custom Reports";
            //document.getElementById("ContentText").innerHTML = "Our photo-uploaders are FAST and built to handle hundreds of photos at a time so you can take large amounts of images from your computer / camera and upload them in a single session. We have stand-alone applications too for Mac and Windows as well as web browser based upload pages. We also have plug-ins that do uploads from iPhoto, Apple Aperture and Adobe Photoshop products.";
        }
    }// End if Page 5
    else if(pageNumber == 6)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "Photo Panels";
            //document.getElementById("ContentText").innerHTML = "This is just one of the dozens of different styled album themes and viewer layouts offered by Pixplug. The Album Viewer lets you showcase your images, accept comments, share, viewers can download images, see them in slideshows or if they have your permission, add photos to your albums as a contributor.";
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Metallic Prints";
            //document.getElementById("ContentText").innerHTML = "The Album Viewer is built smart so that the images will automatically increase in size to display as large as possible depending on the viewers display and browser window size. Smart navigation features let the user change images with a single click of the mouse or advance the album view using the arrow keys on their keyboard (left and right arrows).";
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Prints up to 30 x 40";
            //document.getElementById("ContentText").innerHTML = "Pixplug lets you invite friends to join your site and upload photos to albums you make for them or allow them to have access to. This is a great way to share photos taken at a common event (like a game or wedding everyone attended).";
        }
        else if(popupNumber == 4)
        {
            document.getElementById("TopBarTitle").innerHTML = "Mounted Canvas Prints";
            //document.getElementById("ContentText").innerHTML = "Our photo-uploaders are FAST and built to handle hundreds of photos at a time so you can take large amounts of images from your computer / camera and upload them in a single session. We have stand-alone applications too for Mac and Windows as well as web browser based upload pages. We also have plug-ins that do uploads from iPhoto, Apple Aperture and Adobe Photoshop products.";
        }
        else if(popupNumber == 5)
        {
            document.getElementById("TopBarTitle").innerHTML = "Apparel";
            //document.getElementById("ContentText").innerHTML = "You can make your entire site private or you can make specific albums private. Once private, a user must have permission to access your site / album in order to view or contribute to it (you decide the permissions you want to give your members).";
        }
        else if(popupNumber == 6)
        {
            document.getElementById("TopBarTitle").innerHTML = "Photo Mugs";
            //document.getElementById("ContentText").innerHTML = "Your visitors can download (with your permission) entire albums of photos in a single click. This makes it super-easy to share your photos with family and friends. Visitors can also download individual photos as well.";
        }
        else if(popupNumber == 7)
        {
            document.getElementById("TopBarTitle").innerHTML = "Tote Bags";
            //document.getElementById("ContentText").innerHTML = "Pixplug lets you select the image and size for that image then generate links, html code and embedding object code for you so you can have your image show up on other sites.";
        }
        else if(popupNumber == 8)
        {
            document.getElementById("TopBarTitle").innerHTML = "Photo Puzzles";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
        else if(popupNumber == 9)
        {
            document.getElementById("TopBarTitle").innerHTML = "Playing Cards";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
        else if(popupNumber == 10)
        {
            document.getElementById("TopBarTitle").innerHTML = "Drink Coasters";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
        else if(popupNumber == 11)
        {
            document.getElementById("TopBarTitle").innerHTML = "Photo Buttons";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
        else if(popupNumber == 12)
        {
            document.getElementById("TopBarTitle").innerHTML = "Luggage and Key Tags";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
        else if(popupNumber == 13)
        {
            document.getElementById("TopBarTitle").innerHTML = "Mousepads";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
        else if(popupNumber == 14)
        {
            document.getElementById("TopBarTitle").innerHTML = "Magnets";
            //document.getElementById("ContentText").innerHTML = "Your visitors can view photos at different sizes using our Photo Viewers. When they click on a photo they will see the image shown in the viewer where they can choose to see the Medium, Large, X-Large or even the Original photo displayed onscreen.";
        }
    }// End if Page 5

    else if(pageNumber == 7)
    {
        if(popupNumber == 1)
        {
            document.getElementById("TopBarTitle").innerHTML = "DreamSuite Special Edition";
            document.getElementById("ContentText").innerHTML = "Premium and Professional accounts include DreamSuite Special Edition software for Mac and Windows. This is an award winning visual effects software application that lets you add enhancements to your photos and then upload them to your Pixplug account.";
            var newHTML = "<div class=\"effectsColLeft\">";
            newHTML += "<ul>";
            newHTML += "<li><img src=\"i/tour/page7/35mmFrame.jpg\" alt=\"35mm Frame\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/filmGrain.jpg\" alt=\"Film Grain\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/instamaticFrame.jpg\" alt=\"Instamatic Frame\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/mosaic.jpg\" alt=\"Mosaic\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/putty.jpg\" alt=\"Putty\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "</ul>";
            newHTML += "</div>";
            newHTML += "<div class=\"effectsColRight\">";
            newHTML += "<ul>";
            newHTML += "<li><img src=\"i/tour/page7/4x5Frame.jpg\" alt=\"4 x 5 Frame\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/focus.jpg\" alt=\"Focus\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/mesh.jpg\" alt=\"Mesh\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/photoBorder.jpg\" alt=\"Photo Border\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/tile.jpg\" alt=\"Tile\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "</ul>";
            newHTML += "</div>";
            document.getElementById("softwareEffects").innerHTML = newHTML;
        }
        else if(popupNumber == 2)
        {
            document.getElementById("TopBarTitle").innerHTML = "Mystical Tint Tone and Color Special Edition";
            document.getElementById("ContentText").innerHTML = "Premium and Professional accounts include Mystical Tint Tone and Color Special Edition software for Mac and Windows. This is an award winning visual effects software application that lets you enhance the colors and tonal quality of your photos to improve their look. You can do some great looking effects like Hand Tinting a photo and then upload it to your Pixplug account.";
            var newHTML = "<div class=\"effectsColLeft\">";
            newHTML += "<ul>";
            newHTML += "<li><img src=\"i/tour/page7/antiquePhoto.jpg\" alt=\"Antique Photo\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/bAndW.jpg\" alt=\"Black and White\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/colorMixer.jpg\" alt=\"Color Mixer\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/cool.jpg\" alt=\"Cool\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/darkContrast.jpg\" alt=\"Dark Contrast\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/enrichedBlack.jpg\" alt=\"Enriched Black\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/hsbAdjust.jpg\" alt=\"HSB Adjust\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/handTint.jpg\" alt=\"Hand Tint\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/hardenDetails.jpg\" alt=\"Harden Details\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/levels.jpg\" alt=\"Levels\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "</ul>";
            newHTML += "</div>";
            newHTML += "<div class=\"effectsColRight\">";
            newHTML += "<ul>";
            newHTML += "<li><img src=\"i/tour/page7/overExposed.jpg\" alt=\"Over Exposed\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/sepia.jpg\" alt=\"Sepia\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/softenDetails.jpg\" alt=\"Soften Details\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/tonalContrast.jpg\" alt=\"Tonal Contrast\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/tonalSharpen.jpg\" alt=\"Tonal Sharpen\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/tonalSoften.jpg\" alt=\"Tonal Soften\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/underExposed.jpg\" alt=\"Under Exposed\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/vitality.jpg\" alt=\"Vitality\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/warm.jpg\" alt=\"Warm\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/washedOut.jpg\" alt=\"Washed Out\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "</ul>";
            newHTML += "</div>";
            document.getElementById("softwareEffects").innerHTML = newHTML;
        }
        else if(popupNumber == 3)
        {
            document.getElementById("TopBarTitle").innerHTML = "Pixtivity Special Edition";
            document.getElementById("ContentText").innerHTML = "Premium and Professional accounts include Pixtivity Special Edition software for Windows. Pixtivity is an easy to use presentation program that has hundreds of slideshows, auto players, photo strips, story boards and slideshows that you can create and then upload it to your Pixplug account.";
            var newHTML = "<div class=\"effectsColLeft\">";
            newHTML += "<ul>";
            newHTML += "<li><img src=\"i/tour/page7/autoPlay.jpg\" alt=\"AutoPlay\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/photoStrips.jpg\" alt=\"Photo Strips\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/photoWall.jpg\" alt=\"Photo Wall\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "</ul>";
            newHTML += "</div>";
            newHTML += "<div class=\"effectsColRight\">";
            newHTML += "<ul>";
            newHTML += "<li><img src=\"i/tour/page7/singleCategory.jpg\" alt=\"Single Category\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/slideshow.jpg\" alt=\"Slideshow\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "<li><img src=\"i/tour/page7/storyboard.jpg\" alt=\"Storyboard\" border=\"0\" width=\"355\" height=\"309\" /></li>";
            newHTML += "</ul>";
            newHTML += "</div>";
            document.getElementById("softwareEffects").innerHTML = newHTML;
        }

    }// End if Page 7

    
}// Function GetPopTextTitle


// End Pop up window //
