// local data functions for erik-style picture sites
// copyright 2001 - 2004 Erik Nilsson
// r041123



// start up
function localInit() {
 init() //in pix.js
}

//
// HTML that wraps all frames
//

function writeFramePrefix(frameIndex, topMargin, botMargin, sideMargin,bgImage) {
 frameWrite(frameIndex,"<html><head>"+
 "<link rel=stylesheet type='text/css' href='gen.css'>"+
 "<body bgcolor='"+parent.g_bgColor+
 "' bottommargin="+botMargin+" topmargin="+topMargin+
 " leftmargin="+sideMargin+" rightmargin="+sideMargin)
 if(bgImage != "") {
  //we have a background image
  frameWrite(frameIndex," background='"+bgImage+"'>")
 } else {
  frameWrite(frameIndex,">")
 }
}

function writeFrameSuffix(frameIndex) {
 frameWrite(frameIndex,"</body></html>")
 frameClose(frameIndex)
}


//
// Method of updating frames when the image changes 
// (can depend on what frames exist)
//

// when the user clicks on a thumbnail
function updateFramesForNewImage() {
 top.updateOneFrameType("pictureFrame")
}

// when the user clicks on a menu
function updateFramesForNewMenu() {
 top.updateAllFrames()
}

// when the user clicks on a navigation control
function updateFramesForNav() {
 top.updateAllFrames()
 top.scrollAllFrames()
}

// end //
