// Data and instructions for display of an Ursula Michael design

function stopErr() {
  var msg = ""
  msg += "JavaScript error has occurred!" + "\n"
  msg += "Cannot display the desired information." + "\n\n"
  msg += "Your browser is: " + navigator.appName + " " + navigator.appVersion
  alert(msg)
  return true
}

function ShowPicture(bookRef) {
  window.onerror = stopErr
  var pictItem_  = new Array()
  var pictTitle  = new Array()
  var pictPrice  = new Array()
  var pictImage  = new Array()
  var pictWidth  = new Array()
  var pictHeight = new Array()
  var winWidth
  var winHeight
  var imageBase = "http://www.customhouseofneedlearts.com/charts/UMD/"

  // Define the pictures
  pictItem_[00] = "00000"
  pictTitle[00] = "Not Found!"
  pictPrice[00] = "0.00"
  pictImage[00] = "images/notavailable.gif"
  pictWidth[00] = 175; pictHeight[00] = 175
  pictItem_[01] = "18355"
  pictTitle[01] = "#168 - Threads of Joy"
  pictPrice[01] = "6.00"
  pictImage[01] = "images/168.jpg"
  pictWidth[01] = 275; pictHeight[01] = 360
  pictItem_[02] = "20520"
  pictTitle[02] = "#186 - Winter Home"
  pictPrice[02] = "5.00"
  pictImage[02] = "images/186.jpg"
  pictWidth[02] = 387; pictHeight[02] = 319
  pictItem_[03] = "20992"
  pictTitle[03] = "#189/190 - Stitched With Love / Seek Home"
  pictPrice[03] = "6.00"
  pictImage[03] = "images/189-190.jpg"
  pictWidth[03] = 205; pictHeight[03] = 360
  pictItem_[04] = "20994"
  pictTitle[04] = "#192 - Happily Ever After"
  pictPrice[04] = "5.00"
  pictImage[04] = "images/192.jpg"
  pictWidth[04] = 261; pictHeight[04] = 360
  pictItem_[05] = "21181"
  pictTitle[05] = "#193 - Family Tree"
  pictPrice[05] = "6.00"
  pictImage[05] = "images/193.jpg"
  pictWidth[05] = 371; pictHeight[05] = 363
  pictItem_[06] = "21247"
  pictTitle[06] = "#195 - Believe In Your Dreams"
  pictPrice[06] = "6.00"
  pictImage[06] = "images/195.jpg"
  pictWidth[06] = 316; pictHeight[06] = 360
  pictItem_[07] = "21526"
  pictTitle[07] = "#196 - Joyful Heart"
  pictPrice[07] = "6.00"
  pictImage[07] = "images/196.jpg"
  pictWidth[07] = 401; pictHeight[07] = 352
  pictItem_[08] = "27000"
  pictTitle[08] = "#211 - Forget-Me-Knots Quilt"
  pictPrice[08] = "6.00"
  pictImage[08] = "images/211.jpg"
  pictWidth[08] = 223; pictHeight[08] = 360
  pictItem_[09] = "27001"
  pictTitle[09] = "#212 - Love One Another"
  pictPrice[09] = "6.00"
  pictImage[09] = "images/212.jpg"
  pictWidth[09] = 331; pictHeight[09] = 360
  pictItem_[10] = "27535"
  pictTitle[10] = "#213 - Roses All Around"
  pictPrice[10] = "6.00"
  pictImage[10] = "images/213.jpg"
  pictWidth[10] = 351; pictHeight[10] = 354
  pictItem_[11] = "28720"
  pictTitle[11] = "#215 - Parade of Quilts"
  pictPrice[11] = "6.00"
  pictImage[11] = "images/215.jpg"
  pictWidth[11] = 413; pictHeight[11] = 178
  pictItem_[12] = "29668"
  pictTitle[12] = "#217 - Don't Miss The Boat"
  pictPrice[12] = "6.00"
  pictImage[12] = "images/217.jpg"
  pictWidth[12] = 238; pictHeight[12] = 360
  pictItem_[13] = "29669"
  pictTitle[13] = "#218 - Salty Dog"
  pictPrice[13] = "6.00"
  pictImage[13] = "images/218.jpg"
  pictWidth[13] = 238; pictHeight[13] = 360
  pictItem_[14] = "29670"
  pictTitle[14] = "#219 - Zeke's Creek"
  pictPrice[14] = "6.00"
  pictImage[14] = "images/219.jpg"
  pictWidth[14] = 239; pictHeight[14] = 360
  pictItem_[15] = "29671"
  pictTitle[15] = "#220 - Polly's Boathouse"
  pictPrice[15] = "6.00"
  pictImage[15] = "images/220.jpg"
  pictWidth[15] = 242; pictHeight[15] = 360
  pictItem_[16] = "29639"
  pictTitle[16] = "#221 - Sailboat Neighbors"
  pictPrice[16] = "6.00"
  pictImage[16] = "images/221.jpg"
  pictWidth[16] = 412; pictHeight[16] = 194
  pictItem_[17] = "29710"
  pictTitle[17] = "#222 - So Many Weeds"
  pictPrice[17] = "6.00"
  pictImage[17] = "images/222.jpg"
  pictWidth[17] = 376; pictHeight[17] = 319
  pictItem_[18] = "33723"
  pictTitle[18] = "#223 - Stars and Stripes"
  pictPrice[18] = "6.00"
  pictImage[18] = "images/223.jpg"
  pictWidth[18] = 412; pictHeight[18] = 144
  pictItem_[19] = "29949"
  pictTitle[19] = "#224 - Sunny Little Day"
  pictPrice[19] = "6.00"
  pictImage[19] = "images/224.jpg"
  pictWidth[19] = 412; pictHeight[19] = 180
  pictItem_[20] = "31485"
  pictTitle[20] = "#225 - Harmony Quilts"
  pictPrice[20] = "6.00"
  pictImage[20] = "images/225.jpg"
  pictWidth[20] = 411; pictHeight[20] = 177
  pictItem_[21] = "33724"
  pictTitle[21] = "#226 - Prayer Warms the Soul"
  pictPrice[21] = "6.00"
  pictImage[21] = "images/226.jpg"
  pictWidth[21] = 412; pictHeight[21] = 175
  pictItem_[22] = "31484"
  pictTitle[22] = "#227 - Quilts and Kittens"
  pictPrice[22] = "6.00"
  pictImage[22] = "images/227.jpg"
  pictWidth[22] = 410; pictHeight[22] = 162
  pictItem_[23] = "33725"
  pictTitle[23] = "#228 - Snowmen With Quilts"
  pictPrice[23] = "6.00"
  pictImage[23] = "images/228.jpg"
  pictWidth[23] = 413; pictHeight[23] = 177
  pictItem_[24] = "33726"
  pictTitle[24] = "#229 - I'd Rather Be By The Sea"
  pictPrice[24] = "6.00"
  pictImage[24] = "images/229.jpg"
  pictWidth[24] = 412; pictHeight[24] = 154
  pictItem_[25] = "33727"
  pictTitle[25] = "#230 - Faith Makes All Things Possible"
  pictPrice[25] = "6.00"
  pictImage[25] = "images/230.jpg"
  pictWidth[25] = 413; pictHeight[25] = 159
  pictItem_[26] = "33728"
  pictTitle[26] = "#231 - Safe and Warm"
  pictPrice[26] = "6.00"
  pictImage[26] = "images/231.jpg"
  pictWidth[26] = 412; pictHeight[26] = 179
  pictItem_[27] = "33825"
  pictTitle[27] = "#234 - What Cats Do"
  pictPrice[27] = "6.00"
  pictImage[27] = "images/234.jpg"
  pictWidth[27] = 410; pictHeight[27] = 192
  pictItem_[28] = "19475"
  pictTitle[28] = "#180 - Bless Our Home"
  pictPrice[28] = "6.00"
  pictImage[28] = "images/180.jpg"
  pictWidth[28] = 298; pictHeight[28] = 360
  pictItem_[29] = "19476"
  pictTitle[29] = "#183 - Cozy Cabin"
  pictPrice[29] = "5.00"
  pictImage[29] = "images/183.jpg"
  pictWidth[29] = 289; pictHeight[29] = 360
  pictItem_[30] = "23280"
  pictTitle[30] = "#197 - Bear Hugs"
  pictPrice[30] = "5.00"
  pictImage[30] = "images/197.jpg"
  pictWidth[30] = 391; pictHeight[30] = 362
  pictItem_[31] = "29667"
  pictTitle[31] = "#216 - Where You Sail"
  pictPrice[31] = "6.00"
  pictImage[31] = "images/216.jpg"
  pictWidth[31] = 268; pictHeight[31] = 360
  pictItem_[32] = "18354"
  pictTitle[32] = "#155 - Cottage By The Sea"
  pictPrice[32] = "5.00"
  pictImage[32] = "images/155.jpg"
  pictWidth[32] = 279; pictHeight[32] = 360
  pictItem_[33] = "23074"
  pictTitle[33] = "#200 - My Secret Garden"
  pictPrice[33] = "6.00"
  pictImage[33] = "images/200.jpg"
  pictWidth[33] = 362; pictHeight[33] = 360
  pictItem_[34] = "17062"
  pictTitle[34] = "#158 - Friends Are Like Seashells"
  pictPrice[34] = "6.00"
  pictImage[34] = "images/158.jpg"
  pictWidth[34] = 276; pictHeight[34] = 360
  pictItem_[35] = "19946"
  pictTitle[35] = "#187 - Charming Snow Trio"
  pictPrice[35] = "5.00"
  pictImage[35] = "images/187.jpg"
  pictWidth[35] = 276; pictHeight[35] = 360
  pictItem_[36] = "35226"
  pictTitle[36] = "SMR - Snowmen On Mittens Row"
  pictPrice[36] = "6.00"
  pictImage[36] = "images/SMR.jpg"
  pictWidth[36] = 420; pictHeight[36] = 115
  // Thistle available patterns follow
  pictItem_[37] = "14510"
  pictTitle[37] = "#154 - Love Makes My House&nbsp;A&nbsp;Home"
  pictPrice[37] = "4.00"
  pictImage[37] = "14510.jpg"
  pictWidth[37] = 300; pictHeight[37] = 393
  pictItem_[38] = "15410"
  pictTitle[38] = "#156 - Pansy Smiles"
  pictPrice[38] = "4.00"
  pictImage[38] = "15410.jpg"
  pictWidth[38] = 300; pictHeight[38] = 392
  pictItem_[39] = "17064"
  pictTitle[39] = "#162 - I Heard The Bells"
  pictPrice[39] = "5.00"
  pictImage[39] = "17064.jpg"
  pictWidth[39] = 300; pictHeight[39] = 389
  pictItem_[40] = "17065"
  pictTitle[40] = "#163 - Sweet Is The Smile"
  pictPrice[40] = "5.00"
  pictImage[40] = "17065.jpg"
  pictWidth[40] = 300; pictHeight[40] = 392
  pictItem_[41] = "17440"
  pictTitle[41] = "#170 - Mother Nature Sings The Blues"
  pictPrice[41] = "4.00"
  pictImage[41] = "17440.jpg"
  pictWidth[41] = 300; pictHeight[41] = 393
  pictItem_[42] = "18356"
  pictTitle[42] = "#169 - Fragrant Flowers"
  pictPrice[42] = "5.00"
  pictImage[42] = "18356.jpg"
  pictWidth[42] = 300; pictHeight[42] = 392
  pictItem_[43] = "18357"
  pictTitle[43] = "#171 - Golden Rings"
  pictPrice[43] = "5.00"
  pictImage[43] = "18357.jpg"
  pictWidth[43] = 300; pictHeight[43] = 393
  pictItem_[44] = "18358"
  pictTitle[44] = "#172 - Violets Dance"
  pictPrice[44] = "5.00"
  pictImage[44] = "18358.jpg"
  pictWidth[44] = 300; pictHeight[44] = 389
  pictItem_[45] = "18359"
  pictTitle[45] = "#173 - Backdoor Friends"
  pictPrice[45] = "5.00"
  pictImage[45] = "18359.jpg"
  pictWidth[45] = 300; pictHeight[45] = 392
  pictItem_[46] = "18360"
  pictTitle[46] = "#174 - Laughter Of Angels"
  pictPrice[46] = "5.00"
  pictImage[46] = "18360.jpg"
  pictWidth[46] = 300; pictHeight[46] = 392
  pictItem_[47] = "18361"
  pictTitle[47] = "#178 - With The Heart"
  pictPrice[47] = "5.00"
  pictImage[47] = "18361.jpg"
  pictWidth[47] = 300; pictHeight[47] = 392
  pictItem_[48] = "18710"
  pictTitle[48] = "#177 - A Little Sweeter"
  pictPrice[48] = "6.00"
  pictImage[48] = "18710.jpg"
  pictWidth[48] = 300; pictHeight[48] = 392
  pictItem_[49] = "19460"
  pictTitle[49] = "#185 - Laugh Often"
  pictPrice[49] = "5.00"
  pictImage[49] = "19460.jpg"
  pictWidth[49] = 300; pictHeight[49] = 394
  pictItem_[50] = "19813"
  pictTitle[50] = "#501 - Honey Bear"
  pictPrice[50] = "4.00"
  pictImage[50] = "images/notavailable.gif"
  pictWidth[50] = 175; pictHeight[50] = 175
  pictItem_[51] = "19814"
  pictTitle[51] = "#502 - Dream Time Bear"
  pictPrice[51] = "4.00"
  pictImage[51] = "19814.jpg"
  pictWidth[51] = 250; pictHeight[51] = 385
  pictItem_[52] = "19815"
  pictTitle[52] = "#503 - Best Friend Bear"
  pictPrice[52] = "4.00"
  pictImage[52] = "images/notavailable.gif"
  pictWidth[52] = 175; pictHeight[52] = 175
  pictItem_[53] = "19816"
  pictTitle[53] = "#504 - Counting Bear"
  pictPrice[53] = "4.00"
  pictImage[53] = "images/notavailable.gif"
  pictWidth[53] = 175; pictHeight[53] = 175
  pictItem_[54] = "20519"
  pictTitle[54] = "#184 - Dandy Snowmen Stockings"
  pictPrice[54] = "5.00"
  pictImage[54] = "20519.jpg"
  pictWidth[54] = 300; pictHeight[54] = 390
  pictItem_[55] = "20521"
  pictTitle[55] = "#505 - Bee Happy"
  pictPrice[55] = "5.00"
  pictImage[55] = "20521.jpg"
  pictWidth[55] = 300; pictHeight[55] = 391
  pictItem_[56] = "20522"
  pictTitle[56] = "#506 - Sunny Days"
  pictPrice[56] = "5.00"
  pictImage[56] = "20522.jpg"
  pictWidth[56] = 300; pictHeight[56] = 390
  pictItem_[57] = "20991"
  pictTitle[57] = "#188 - Raise Your Family"
  pictPrice[57] = "5.00"
  pictImage[57] = "20991.jpg"
  pictWidth[57] = 287; pictHeight[57] = 457
  pictItem_[58] = "21120"
  pictTitle[58] = "#191 - Peace On Earth"
  pictPrice[58] = "5.00"
  pictImage[58] = "21120.jpg"
  pictWidth[58] = 250; pictHeight[58] = 393
  pictItem_[59] = "21246"
  pictTitle[59] = "#194 - Castle By The Sea"
  pictPrice[59] = "5.00"
  pictImage[59] = "21246.jpg"
  pictWidth[59] = 250; pictHeight[59] = 392
  pictItem_[60] = "23039"
  pictTitle[60] = "#198 - Dreams To Sell"
  pictPrice[60] = "6.00"
  pictImage[60] = "23039.jpg"
  pictWidth[60] = 275; pictHeight[60] = 432
  pictItem_[61] = "23040"
  pictTitle[61] = "#199 - Happy Is The Home"
  pictPrice[61] = "6.00"
  pictImage[61] = "23040.jpg"
  pictWidth[61] = 275; pictHeight[61] = 433
  pictItem_[62] = "23271"
  pictTitle[62] = "#181 - Garden Cart"
  pictPrice[62] = "5.00"
  pictImage[62] = "images/notavailable.gif"
  pictWidth[62] = 175; pictHeight[62] = 175
  pictItem_[63] = "23960"
  pictTitle[63] = "#202 - My Friend Pillow Pocket"
  pictPrice[63] = "6.00"
  pictImage[63] = "23960.jpg"
  pictWidth[63] = 250; pictHeight[63] = 387
  pictItem_[64] = "23961"
  pictTitle[64] = "#203 - Bee Yee Humble"
  pictPrice[64] = "6.00"
  pictImage[64] = "23961.jpg"
  pictWidth[64] = 250; pictHeight[64] = 382
  pictItem_[65] = "23962"
  pictTitle[65] = "#205 - A Sister's Love Lasts Forever"
  pictPrice[65] = "6.00"
  pictImage[65] = "23962.jpg"
  pictWidth[65] = 250; pictHeight[65] = 381
  pictItem_[66] = "24386"
  pictTitle[66] = "#204 - Our Little One Pocket Keepsake"
  pictPrice[66] = "6.00"
  pictImage[66] = "24386.jpg"
  pictWidth[66] = 250; pictHeight[66] = 388
  pictItem_[67] = "24387"
  pictTitle[67] = "#206 - Pocket-Full-Of-Posies"
  pictPrice[67] = "6.00"
  pictImage[67] = "24387.jpg"
  pictWidth[67] = 250; pictHeight[67] = 390
  pictItem_[68] = "24388"
  pictTitle[68] = "#207 - Butterfly Pocket"
  pictPrice[68] = "6.00"
  pictImage[68] = "24388.jpg"
  pictWidth[68] = 248; pictHeight[68] = 404
  pictItem_[69] = "24389"
  pictTitle[69] = "#209 - Family Remembrance 2000"
  pictPrice[69] = "6.00"
  pictImage[69] = "24389.jpg"
  pictWidth[69] = 250; pictHeight[69] = 388
  pictItem_[70] = "24898"
  pictTitle[70] = "#201 - Oh Happy Day!"
  pictPrice[70] = "6.00"
  pictImage[70] = "24898.jpg"
  pictWidth[70] = 250; pictHeight[70] = 377
  pictItem_[71] = "27536"
  pictTitle[71] = "#707 - Sweetheart Bunnies"
  pictPrice[71] = "6.00"
  pictImage[71] = "27536.jpg"
  pictWidth[71] = 300; pictHeight[71] = 206

  // Get the book number from the given book reference and check for not available status
  var bookNum   = bookRef
  var strikeOn  = ""
  var strikeOff = ""
  var notAvail  = ""
  if (bookRef.indexOf("not available") >= 0) {
    if (bookRef.indexOf(" ") > 0) {
      bookNum = bookRef.substr(0,bookRef.indexOf(" "))
    }
    strikeOn  = "<STRIKE>"
    strikeOff = "</STRIKE>"
    notAvail  = " [not available]"
  }
  // Find the desired picture number from the book number
  var pictNum = 0
  for (var i=1; i < pictImage.length; i++) {
    if (pictTitle[i].indexOf(bookNum) >= 0) {
      pictNum = i; i = pictImage.length
      if (pictImage[pictNum].indexOf("/") < 0) {
        imageBase = "images/"
      }
      pictImage[pictNum]= imageBase + pictImage[pictNum]
    }
  }
  winWidth  = pictWidth[pictNum] + 300
  winHeight = pictHeight[pictNum] + 110
  if (pictWidth[pictNum] < 200) {
    winWidth += 200 - pictWidth[pictNum]
  }
  if (pictTitle[pictNum].indexOf("SMR") >= 0) {
    winHeight += 145
  }
  if (winHeight < 275) {
    winHeight += 275 - winHeight
  }
  // Define the window parameters
  var windowFeatures = "scrollbars,"
  if (navigator.appName == "Microsoft Internet Explorer") {
    windowFeatures += "width=" + winWidth + ",height=" + winHeight + ",left=0,top=0"
  } else {
    windowFeatures += "width=" + winWidth + ",height=" + winHeight + ",screenX=0,screenY=0"
  }
  // Open the new window
  var repWindow = window.open("","",windowFeatures)
  if (repWindow != null) {
    // Create the new html text
    var repPage = ""
    repPage += "<HTML><HEAD><TITLE>" + pictTitle[pictNum] + "</TITLE>" + "\n"
    repPage += "</HEAD>" + "\n"
    repWindow.document.write(repPage); repPage = ""
    repPage += "<BODY BGCOLOR=\"#FCFFD0\">" + "\n"
    repPage += "<P ALIGN=CENTER>"
    repPage += "<FONT SIZE=6 COLOR=Fuchsia><B>Thistle Needleworks</B></FONT>" + "\n"
    repPage += "<P><CENTER><TABLE BGCOLOR=White CELLPADDING=6 ALIGN=Center><TR><TD>" + "\n"
    repPage += "<P ALIGN=CENTER><IMG SRC=\"" + pictImage[pictNum] + "\" BORDER=1"
    repPage += " WIDTH=" + pictWidth[pictNum] + " HEIGHT=" + pictHeight[pictNum]
    repPage += " ALT=\"" + pictTitle[pictNum] + notAvail + "\">" + "\n"
    repWindow.document.write(repPage); repPage = ""
    if (bookNum == "SMR") {
    var pictSMR = pictImage[pictNum].substr(0,pictImage[pictNum].indexOf(".jpg")) + "-2.jpg"
    repPage += "<BR><IMG SRC=\"" + pictSMR + "\" BORDER=1"
    repPage += " WIDTH=180 HEIGHT=119"
    repPage += " ALT=\"Snowmen on Mittens Row (enlarged)\">" + "\n"
    repWindow.document.write(repPage); repPage = ""
    }
    repPage += "</TD>" + "\n"
    //begin the second column
    repPage += "<TD VALIGN=Top>" + "\n"
    repPage += "<B><BIG>Ursula Michael Designs</BIG></B>" + "\n"
    repPage += "<P ALIGN=CENTER><B>" + strikeOn
    if (pictTitle[pictNum].indexOf(" / ") < 0) {
    repPage += pictTitle[pictNum]
    } else {
    repPage += pictTitle[pictNum].substr(0,pictTitle[pictNum].indexOf(" / ") + 2) + "<BR>"
    repPage += pictTitle[pictNum].substr(pictTitle[pictNum].indexOf(" / ") + 3)
    }
    repPage += strikeOff + "</B>" + "\n"
    repWindow.document.write(repPage); repPage = ""
    repPage += "<P><B>#" + strikeOn + pictItem_[pictNum] + strikeOff + "</B><BR>" + "\n"
    repPage += "<B>$ " + strikeOn + pictPrice[pictNum] + strikeOff + "</B>" + "\n"
    if (notAvail.length > 0) {
    repPage += "<P ALIGN=CENTER><B><I>This pattern is no longer available.</I></B>" + "\n"
    }
    repWindow.document.write(repPage); repPage = ""
    repPage += "<P ALIGN=CENTER><A HREF=javascript:window.close() "
    repPage += "ONMOUSEOVER=\"window.status='Close this window';return true\" "
    repPage += "ONMOUSEOUT=\"window.status='';return true\"><SMALL>Close this window</SMALL></A>" + "\n"
    repWindow.document.write(repPage); repPage = ""
    //end of second column
    repPage += "</TD></TR></TABLE></CENTER>" + "\n"
    repWindow.document.write(repPage); repPage = ""
    repPage += "</BODY></HTML>" + "\n"
    repWindow.document.write(repPage)
    repWindow.document.close()
  }
}

