// User Settings



// OFFSETS: iframe width beyond photo, iframe height beyond photo, frame spacer width offset, frame spacer height offset,

//          scrollbox top, scrollbox left, scrollbox right, scrollbox bottom, right margin padding



var base = [28,39,0,0,86,26,20,35,8,'basic']; // Basic White frame

var corn = [30,33,48,51,91,26,22,28,7,'corner']; // Album Corners frame

var line = [14,26,0,0,82,16,14,26,8,'plainline']; // Simple Line frame

var deco = [14,17,73,80,83,16,19,35,8,'artdeco']; // Art Deco frame

var pipe = [16,32,76,36,92,22,17,44,8,'pipeline']; // Pipe Border frame

var bare = [6,12,0,0,82,16,8,24,8,'barepic']; // Bare Photo (no border)



var sP = ["",base,corn,line,deco,pipe,bare];

var timerChk=false;

var testIMG="/images/content/ferrydock_th.jpg";



function pframe(imgID,align,style,wd,ht) {

  preLoad(testIMG);

  chkLoad();



  var fwd = wd+sP[style][0];

  if(align == "left") {fwd += sP[style][8];}

  var fht = ht+sP[style][1];

  var lwd = wd+sP[style][0];

  var lht = ht+sP[style][1];

  var iwd = sP[style][2];

  var iht = sP[style][3];

  var sct = sP[style][4];

  var scl = sP[style][5];

  var scr = sP[style][6];

  var scb = sP[style][7];

  var snm = sP[style][9];

  

  document.write('<iframe name="'+imgID+'" scrolling="no" align="'+align+'" ');

  document.write('src="frame.shtml?'+imgID+'|'+snm+'|'+lwd+'|'+lht+'|'+iwd+'|'+iht+'|'+sct+'|'+scl+'|'+scr+'|'+scb+'" ');

  document.write('marginwidth="0" marginheight="0" border="0" frameborder="0" width="'+fwd+'" height="'+fht+'">');

  document.write('Your browser does not support inline frames or is currently not configured to display inline frames.</iframe>');

}



function preLoad(imgURL) { 

  imgPreload=new Image();

  imgPreload.src=imgURL;

}



function chkLoad() {   

  if (imgPreload.complete) { 

for (var i=0; i<imgs.length; i++) {

var w=imgs[i].width, h=imgs[i].height;

alert("Width = "+w+" and Height = "+h);

}





    iWidth = document.images[0].width; 

    iHeight = document.images[0].height;

// get file size and return



  }

  else { timerChk=setTimeout("chkLoad()",100);}

}

