var myWidth     = 0, 
    myHeight    = 0;


function alertSize() {
 
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
}


function doFullScreen(theURL) {

    myWidth = screen.width - 17;
    myHeight= screen.height +7;
    
    Spawn_win_nav2(theURL + '?myWidth=' + myWidth + '&myHeight=' +  myHeight, myWidth, myHeight);
}

function addbookmark()
{
bookmarkurl=document.location.href;
bookmarktitle=document.title;
if (document.all)
    window.external.AddFavorite(bookmarkurl,bookmarktitle)
}


var gIndex = 0;

function newLink(){
    
    if(document.forms[0].compositePix == '[object]'){

        if(document.forms[0].compositePix.value == '1'){
            DropDownChange(gIndex, 1);
            return false;
        }else{

            return true;
        }
    }else{

        return true;

    }
}


function doDropDownChange(iIndex){
    
    DropDownChange(iIndex, -1);

}






<!-- Need to fix -->
function dolink(sLink){

    sLink = "/constructor/wiz/popframes.jsp?sURL=" + sLink;

    Spawn_win_nav(sLink, 640, 480);

}




<!-- Need to fix -->
function doLink(iType){
    
    sURL        = "/servlet/constructor.includeHTTP?iwebsiteID="        +   document.forms[0].iwebsiteID.value      
                                                + "&isectionID="        +   document.forms[0].isectionID.value  
                                                + "&isectionTypeID="    +   iType                                   
                                                + "&ipageID="           +   document.forms[0].ipageID.value
                                                + "&previousSection="   +   document.forms[0].previousSection.value
                                                + "&skeywords="         +   document.forms[0].skeywords.value;
    
    //alert(sURL);
                
    location.href  = sURL;               

}




function checkFields(){

	
	var sTemp = "";
	
	//alert(document.forms.feedback.last.value);
	
	if(document.forms.feedback.last.value == "")
		sTemp =1;
	
	if(document.forms.feedback.email.value == "")
		sTemp =1;
	
	if(sTemp  == 1)
		alert("Please provide the required fields denoted by an asterix '*'");
	else
	   document.forms.feedback.submit();
}





//Array function
function makeArray(len){
for(var i=0; i < len; i++) this[i] = null;
this.length = len;
}

function getDate(){

var now = new Date();
var day = now.getDay();
var second = now.getSeconds();
var minute = now.getMinutes();
var hour = now.getHours();
var year = now.getYear();
var date = now.getDate();
var month = now.getMonth();

var dayname;
	if (day == 0) dayname ="Sunday";
	if (day == 1) dayname ="Monday";
	if (day == 2) dayname ="Tuesday";
	if (day == 3) dayname ="Wednesday";
	if (day == 4) dayname ="Thursday";
	if (day == 5) dayname ="Friday";
	if (day == 6) dayname ="Saturday";

var monthNames = new makeArray(12);
monthNames[0]= "January";
monthNames[1]= "February";
monthNames[2]= "March";
monthNames[3]= "April";
monthNames[4]= "May";
monthNames[5]= "June";
monthNames[6]= "July";
monthNames[7]= "August";
monthNames[8]= "September";
monthNames[9]= "October";
monthNames[10]= "November";
monthNames[11]= "December";


document.write(dayname + ", " + monthNames[month] + " " + date + ", " + year);

}

   function Spawn_win_nav2(linkto, winWidth, winHeight){  
   
    var str;  
    
    var winl = (screen.width - winWidth) / 2;
    var wint = (screen.height - winHeight) / 2;
    
   
   if(winl <10)
    winl = 0

   if(wint <10)
    wint = 0

 
   str = "width=" + winWidth + ",height=" + winHeight + ",top=" + wint + ",left=" + winl + ",scrollbars=yes,resizable=1";  
   
    spawn120  = window.open(linkto, 'viewStyle22', str );  
   //spawn10.window.moveTo(10,10);   

   if (spawn120.blur) spawn120.focus();  

   } 

	
var expDays = 30;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

function getCookieVal (offset) {  
	var endstr = document.cookie.indexOf (";", offset);  
	if (endstr == -1)    
	endstr = document.cookie.length;  
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
	var j = i + alen;    
	if (document.cookie.substring(i, j) == arg)      
	return getCookieVal (j);    
	i = document.cookie.indexOf(" ", i) + 1;    
	if (i == 0) break;   
}  
return null;
}


var MailingList = GetCookie("mailinglist");

var sDisplayText = '';

function setIntroText(newText){

    sDisplayText = newText;
}


function myFunction(request){
        //alert(request.responseText);
}


function Spawn_win_nav(linkto, winWidth, winHeight){  

   displayPopup(2,linkto,'win2',winHeight,winWidth,null);
     
} 



        var version4 = (navigator.appVersion.charAt(0) == "4");
        var popupHandle;
        function closePopup() {
        if(popupHandle != null && !popupHandle.closed) popupHandle.close()
        }




        function displayPopup(position,url,name,height,width,evnt)
        {
        // Nannette Thacker http://www.shiningstar.net
        // position=1 POPUP: makes screen display up and/or left,
        //    down and/or right
        // depending on where cursor falls and size of window to open
        // position=2 CENTER: makes screen fall in center

        var properties = "toolbar=0,scrollbars=yes,resizable=1,location=0,height="+height
        properties = properties+",width="+width

        var leftprop, topprop, screenX, screenY, cursorX, cursorY, padAmt

        if(navigator.appName == "Microsoft Internet Explorer")
        {
                screenY = document.body.offsetHeight
                screenX = window.screen.availWidth
        }
        else
        { // Navigator coordinates
        //		screenY = window.outerHeight
        //		screenX = window.outerWidth
                // change made 3/16/01 to work with Netscape:
                        screenY = screen.height;
                        screenX = screen.width;
        }

        if(position == 1)	// if POPUP not CENTER
        {
                cursorX = evnt.screenX
                cursorY = evnt.screenY
                padAmtX = 10
                padAmtY = 10

                if((cursorY + height + padAmtY) > screenY)	
                // make sizes a negative number to move left/up
                {
                        padAmtY = (-30) + (height*-1);	
                        // if up or to left, make 30 as padding amount
                }
                if((cursorX + width + padAmtX) > screenX)
                {
                        padAmtX = (-30) + (width*-1);	
                        // if up or to left, make 30 as padding amount
                }

                if(navigator.appName == "Microsoft Internet Explorer")
                {
                        leftprop = cursorX + padAmtX
                        topprop = cursorY + padAmtY
                }
                else
                { // adjust Netscape coordinates for scrolling
                        leftprop = (cursorX - pageXOffset + padAmtX)
                        topprop = (cursorY - pageYOffset + padAmtY)
                }
        }
        else	// CENTER
        {
                leftvar = (screenX - width) / 2
                rightvar = (screenY - height) / 2

                if(navigator.appName == "Microsoft Internet Explorer")
                {
                        leftprop = leftvar
                        topprop = rightvar
                }
                else
                { // adjust Netscape coordinates for scrolling
                        leftprop = (leftvar - pageXOffset)
                        topprop = (rightvar - pageYOffset)
                }
        }

        if(evnt != null)
        {
        properties = properties+",left="+leftprop
        properties = properties+",top="+topprop
        }
        closePopup()
        popupHandle = open(url,name,properties)
        }


 

    function prepareOrdering(){
    
        var Form1 = document.sendeMail;
        
        var sDelimiter = "";
        var formIndex;
        
        //alert(document.sendeMail.OrderedValue);

        for (formIndex = 0; formIndex < Form1.length; formIndex++)
        {

            //if(document.sendeMail.OrderedValue == '[object]'){

                if(document.sendeMail.elements[formIndex].name != "OrderedValue"){

                    document.sendeMail.OrderedValue.value =     document.sendeMail.OrderedValue.value + 
                                                                sDelimiter + 
                                                                document.sendeMail.elements[formIndex].name

                    sDelimiter = "|";
                }
            //}
            

        }

        //alert(document.sendeMail.OrderedValue.value);

    }



	
//New version of print it print page
<!-- -Need to fix- FIXED -->
function doPrintPage(){
    var currentPageIs = document.location.href;
    printit();

}


function printit(){  
if (window.print) {
    window.print() ;  
} else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    WebBrowser1.outerHTML = "";  
}
}


//#############################GOoooooogle Map + Gen Lib##########################################






function viewThisPix(iIndex) {
          

	document.mainPix.src = aImage[iIndex];
        
        document.getElementById("imageTitle").innerHTML = aTitle[iIndex];

        document.getElementById("imageDetails").innerHTML = aDetail[iIndex];
        


        if(aURL[iIndex] == '' || aURL[iIndex] == 'null'){
            document.getElementById("mainPixLink").disabled = true;
        }else{
            document.getElementById("mainPixLink").disabled = false;
            document.getElementById("mainPixLink").href = aURL[iIndex];
            
        }


}


//******************************* Tabs Here **************************************//
/***********************************************
* DD Tab Menu II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=[1, "sc1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes


////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){

    //UI handle
    
    document.getElementById("cell" + cid).className = "bgTabs_on";
    handleTabState();

    if(previoustab != ""){
    document.getElementById("cell" + previoustab).className = "bgTabs";
    }

    if (disabletablinks==1)

    aobject.onclick=new Function("return false")

    if (document.getElementById && turntosingle==0){
    highlighttab(aobject)
    if (previoustab!="")
    document.getElementById(previoustab).style.display="none";

    document.getElementById(cid).style.display="block"
    previoustab=cid
}
}

function handleTabState(){

    collectddimagetabs()
    
    for (i=0; i<tabobjlinks.length; i++){
    
        if(document.getElementById("cellsc" + (1 * i + 1)) == "[object]")

            document.getElementById("cellsc" + (1 * i + 1)).className = "bgTabs";
            
        
    }

}



function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collectddimagetabs()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}

function collectddimagetabs(){
var tabobj=document.getElementById("ddimagetabs")
tabobjlinks=tabobj.getElementsByTagName("A")
}

function do_onload(){
collectddimagetabs()
expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

function initTabs(){

    if (window.addEventListener)
        window.addEventListener("load", do_onload, false)
    else if (window.attachEvent)
        window.attachEvent("onload", do_onload)
    else if (document.getElementById)

    window.onload=do_onload
}

function ReleaseBox(){
    
   // setTimeout('ShowWindows("")', 3000);

}

var gIndexingOffset = 1; 

function ShowWindows(windowName){

    var y = new getObj(windowName); 

    y.style.visibility  ="visible";
    
//var posx = 0;
//var posy = 0;
//var offSetposx = 0;
//var offSetposy = 0;
   
    y.style.top     = (offSetposy + posy-35) + "px";
    y.style.left    = (offSetposx + posx-35) + "px";
    y.style.zIndex  = 1000 + gIndexingOffset;
    gIndexingOffset ++;
}

var gLeave = "";

function delayLeave(windowName){
    gLeave = windowName;
    setTimeout("globalHide()", 1300); //1.3 seconds

}

function globalHide(){
    hidebox(gLeave);
}

function hidebox(windowName){

    var y = new getObj(windowName); 

    y.style.visibility ="hidden";

}


function getObj(name)
{

try{



  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }

}catch(e){

    //alert("" + e + "--name-" + name)

}


}



//Get the mouse coordinates -----------------------------
var posx = 0;
var posy = 0;

//used to bypass compatibility issue with mouse positioning
var offSetposx = 0;
var offSetposy = 0;

function getXY(){

    return posx + ":" + posy;

}


function checkwhere(e) {
	if(!e)var e = window.event;
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}

        //self.status = "X= "+ posx + "  Y= " + posy; 
}

document.onmousemove = checkwhere;
if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}


//END Get the mouse coordinates -----------------------------




//$$$$$$$$$$$$$$$$$$$$$$ DHTML Gallery $$$$$$$$$$$$$$$$$$$$$$$$
var containerLeft;
var speedPause          = 250; //check every 1/4 second
var swapTimer           = 0;
var pauseButtonState    = -1;
var zpause              = -1;
var priorAction         = -1;
var displayRemote       = true;


function disableRemote(){
    
    displayRemote = false;

}


function initGallery(){

    var layerName = '';

    for(var i=1; i<containerCount+1; i++){
        
        layerName = 'containerLeft' + i;

        
	var x = new getObj('containerLeft' + i); 
	x.style.visibility = 'hidden';
        x.style.position = 'absolute';
        x.style.width = '750px';
        x.style.zIndex = 100;

    }

    initGlobals();
    
    setTimeout("play()", 500);

}


var currentIndex = -1;
var oldIndex = -1;

function initGlobals(){
    
    speedTransition = 513;
    speedStick      = 14900;
    currentIndex    = 1;
    oldIndex        = 1;
    containerWidth  = 750;

}

var remote  = "";
var footer  = "";
var type    = "img"; //img, mp3,flv


function myDetails(request){

        //store the remote into memory
	var temp = request.responseText;

        var     buff       = new getObj("newText"); 
       
        buff.obj.innerHTML  = temp;

}


function myRemote(request){
        
        //store the remote into memory
	remote = request.responseText;
 

        //y.style.zIndex = 0;
        
}



function jukeboxPlay(request){
        
        //store the remote into memory
	var DHTML = request.responseText;
        
        //do footer init stuff
	var objDiv = new getObj("mainPix"); 
        objDiv.style.visibility = "visible";

        //alert(DHTML);

        objDiv.obj.innerHTML = DHTML;

        //y.style.zIndex = 0;
        
}


var baseLine        = 1080;
var remoteTop       = 0;
var cursor          = 0;
var upperBound      = 4;
var upperPixType    = "L";
var doCollageChange = 1;


var bPaused         = false;

function zoomMax(){

    var buff                = new getObj("mainPix");
    var zoom                = new getObj("zoom2");
    zoom.obj.innerHTML      = "<a href=\"javascript:unZoom()\">" + buff.obj.innerHTML.replace("thumbz__", "2thumbz__") + "</a>";
    zoom.style.visibility   = "visible";

    if(pauseButtonState == 1) //already paused?
        bPaused = true;
    else
        bPaused = false;

    //Freeze the slide show
    pauseButtonState = 1;

}

function unZoom(){
    
    hideRemote();
    start();
    var zoom                = new getObj("zoom2");
    zoom.style.visibility   = "hidden";

    if(!bPaused)
        pauseButtonState = -1;
}



var iCounterAssets = 0;




function updateAssets(){

        var     buff3           = new getObj("details" + currentIndex); 
        var     sBuff           = "" + buff3.obj.innerHTML;
        var     containerText;


        
        //remoteTop = baseLine - containerLeft.obj.offsetHeight;

        var buff        = new getObj("mainPix");
        var remoteObj   = new getObj("remote"); 
        
	remoteObj.obj.innerHTML = remote.replace("?progress?", currentIndex + " of " + containerCount);

        //pauseButtonDisplay();

        remoteObj.obj.onmouseover     = function(){showRemote()};
        remoteObj.obj.onmouseout      = function(){hideRemote()};

        var buff2           = new getObj("image" + currentIndex);
        var buff3           = new getObj("imageURLlink" + currentIndex);

        var thisURL         = "" + buff3.obj.innerHTML; //to link object
        
        var fileName = buff2.obj.innerHTML;        
        var fileExtension = fileName.substring(fileName.lastIndexOf('.')+1,fileName.length)

        if(fileExtension == "mp3"){
            type = "mp3";
            containerText = new getObj("containerTextBack");
            
        }else{
            
            containerText = new getObj("containerText");
         
        }



        if(type=="mp3"){

            new ajax ("MP3PLAYER|../../" + fileName + "|180|17|TRUE|TRUE", {onComplete: jukeboxPlay}, 1);

            upperBound = containerCount;

            var objDiv = new getObj("mainPix");
            objDiv.obj.innerHTML = "Buffering sound . . .";


        }else{

            //Init Remote
            if(iCounterAssets == 0){
                    
                    if(containerCount>4)
                        new ajax ("AJAXCONTENT|4192.1.27107.105985", {onComplete: myRemote}, 1);

                       //do footer init stuff
                    var footerDiv = new getObj("footerMargin"); 
                    footerDiv.style.visibility = "hidden";

                    var footerObj = new getObj("footerGallery"); 
                    footerObj.obj.innerHTML = footerDiv.obj.innerHTML;

                    var objDiv = new getObj("mainPix");
                    objDiv.style.width = containerWidth +"px";

            }
                
            
            if(thisURL != '')
                buff.obj.innerHTML  = "<a href=\"" + thisURL + "\"><img src=\"" + buff2.obj.innerHTML.replace("thumbz__", "/Thumbz/thumbz__") + "\" border=0 alt=\"\"></a>" ;
            else
                buff.obj.innerHTML  = "<img src=\"" + buff2.obj.innerHTML.replace("thumbz__", "/Thumbz/thumbz__") + "\" border=0 alt=\"\">";

            //Add event at runtime



            if(containerCount>4){

                buff.obj.onmouseover            = function(){showRemote()};
                buff.obj.onmouseout             = function(){hideRemote()};
            }

            //var objDiv = new getObj("mainPix");
            //objDiv.obj.innerHTML = "Buffering pix . . .";


        }

        iCounterAssets ++;
        buff2               = new getObj("imageTitle" + currentIndex); 
        

         //alert(sBuff);

        if(sBuff.indexOf('AJAXCONTENT') != -1){            
           
            containerText.obj.innerHTML     = "<div class=\"cImageTitle\" id=\"newTitle\">" + buff2.obj.innerHTML + "</div><div id=\"newText\"><br><br>Loading content . . .</div><div id=\"bottomNav\"></div>";
            
            new ajax (sBuff, {onComplete: myDetails}, 1);

        }else if(containerText.obj + "" != "null"){

            containerText.obj.innerHTML     = "<div class=\"cImageTitle\" id=\"newTitle\">" + buff2.obj.innerHTML + "</div><div id=\"newText\">" + sBuff + "</div><div id=\"bottomNav\"></div>";
        }

        
        
        if(doCollageChange==1)
            updateCollageAssets();


}


var thisIndex = -1;

function viewThis(index){
    
    if(thisIndex != index){


        currentIndex    = index;
        doCollageChange = 0;

        updateAssets();

        thisIndex = index;

     }

}

function     updateCollageAssets(){  
            

        var content     = "";
        var annotations = "";
        var trFlag      = 0;
        
        cursor = currentIndex + 1;
        

            for(i=1; i<=upperBound; i++){

                if(cursor > containerCount)
                    cursor = 1;

                var objIMG      = new getObj("image" + cursor);
                var objAnnote   = new getObj("imageTitle" + cursor);

                var onMouseOver = "";

                if(containerCount==4)
                    onMouseOver = " onMouseOver=viewThis(" + cursor + ") ";

                if(type=="mp3")
                    content +=   "<td><a href=\"javascript:previewThis(" + cursor + ");\">" + objAnnote.obj.innerHTML + "</a></td>";
                else
                    content +=   "<td><a href=\"javascript:previewThis(" + cursor + ");\"><img " + onMouseOver + " src=\"" + objIMG.obj.innerHTML + "\" border=0 alt=\"\"></a><br>" + objAnnote.obj.innerHTML + "</td>";
                //annotations += "<td>" + objAnnote.obj.innerHTML + "</td>";


                trFlag++;

                if(trFlag==2){

                    //content += "</tr><tr valign=\"top\">" + annotations + "</tr><tr>";
                    content += "</tr><tr>";
                    annotations = "";

                    trFlag = 0;

                }

                cursor++; 

            }



        

        if(trFlag==1)
            content += "<td>&nbsp;</td>"
            
        var bufferName = "preview1";

        if(type=="mp3")
            bufferName = "bottomNav";


        buff = new getObj(bufferName); 
        
	buff.obj.innerHTML = "<br><table cellpadding=3 cellspacing=1 border=0><tr valign=\"top\">" + content + "</tr></table>";


	
}


function displayID3(GUID){

    var Info = new getObj(GUID); 

    Info.style.visibility   = "visible";
    Info.style.top          = "-36px";     
}

function hiddeID3(GUID){

    var Info = new getObj(GUID); 

    Info.style.visibility  = "hidden";
         

}

function freeze(){

    zpause   = 1;

}


function start(){

    zpause   = -1;

}

function next(){

    if(priorAction == 2)
        currentIndex++;

    updateAssets();
    
    currentIndex++;

    if(currentIndex>containerCount)
        currentIndex = 1;

   priorAction = 4;

   pauseButtonDisplay();

}

function prev(){

    //alert(currentIndex);

    currentIndex--;

    if(priorAction != 2){
        currentIndex--;
        
        if(currentIndex==-1)
            currentIndex=containerCount-1;

    }
    if(currentIndex<=0)
        currentIndex=containerCount;

    updateAssets();

    priorAction = 2;
 
    pauseButtonDisplay();
   
}


function beggining(){

    currentIndex=1;
    updateAssets();
    currentIndex++;

    priorAction = 1;

    pauseButtonDisplay();
}



function end(){

    currentIndex=containerCount;
    updateAssets();
    currentIndex=1;

    priorAction = 5;

    pauseButtonDisplay();
}


function showRemote(){
    

    if(displayRemote){

        var remoteObj               = new getObj("remote");
        remoteObj.style.visibility  = "visible";
       
    }

    freeze();
    
}




function hideRemote(){
        
        setTimeout("justWait()", 1000);

        if(zpause == 1 || zpause == -2)
            hide();


}

function justWait(){}

function hide(){
    

        var remoteObj               = new getObj("remote");
        remoteObj.style.visibility  = "hidden";
        start();

}



function pausebtn(){
    
    
    
    if(pauseButtonState == 1){ //the play button is on
        
        pauseButtonState = -1;
       
        
    }else{
        
        pauseButtonState = 1;
        
    }

    pauseButtonDisplay();
}


function click(objThis){


}


function previewThis(index){

    currentIndex = index;

    updateAssets();

}


//mp3 player callback function
function mp3PlayerStopped(){


        updateAssets();

        currentIndex++;

        if(currentIndex>containerCount)
            currentIndex = 1;
            
        if(swapTimer !=0)
            speedStick = swapTimer;

}

//Player engine root level
function play(){ 

    if(type=="mp3"){

        //do nothing wait for the call back to do the job

    }else if(zpause == -1 && pauseButtonState == -1 && thisIndex == -1){
    
        //alert(1111);

        updateAssets();

        currentIndex++;

        if(currentIndex>containerCount)
            currentIndex = 1;
            
        if(swapTimer !=0)
            speedStick = swapTimer;


    }else if(thisIndex == -1){
        
        if(swapTimer ==0)
            swapTimer   = speedStick; 
        
        speedStick  = speedPause;

    }

    setTimeout("play()", speedStick);
}



//############### END DHTML Gallery ###############################################################


<!-- Need to fix -->
arImageSrc = new Array ("http://imageserver.webpropartners.com/LightBox/images/loading.gif","http://imageserver.webpropartners.com/LightBox/images/loading.gif");
arImageList = new Array ();
for (counter in arImageSrc) {
arImageList[counter] = new Image();
arImageList[counter].src = arImageSrc[counter];
}
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - 50;
var toppos = height / 2 - 30;


function encode(str){ // Netscape fix thanks to Cyanide_7
return escape(str.replace(/ /g,'+'));
}


function view(what) {
var img = document.createElement("img");
img.src = what;
var height = img.height;
var width = img.width;

window.open(what,'WIN','scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width='+width+',height='+height+',left=' + leftpos + ',top=' + toppos);
}
function getParams() {
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++) {
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
   }
}
return params;
}
params = getParams();
function resize() {
if (eval(pic).height) {
var name = navigator.appName
if (name == "Microsoft Internet Explorer") {
myHeight = eval(pic).height + 60;
myWidth = eval(pic).width + 12;


alert(myHeight);
}
else {
myHeight = eval(pic).height + 20;
myWidth = eval(pic).width;
}
clearTimeout();
var height = screen.height;
var width = screen.width;
var leftpos = width / 2 - myWidth / 2;
var toppos = height / 2 - myHeight / 2; 
self.moveTo(leftpos, toppos);
self.resizeTo(myWidth, myHeight);
document.il.src = '../../graphics/loaded.gif';
}
else setTimeOut(resize(), 100);
}

//##############CALLBACK studs for flash object
//function mp3PlayerStopped(){}



