// JavaScript Document
  function vbp() {
var browser=navigator.appName;

//If you change the image these absolute positions will need to be changed using trial and error

if (browser=="Microsoft Internet Explorer")
{
var topsize = "225";
var top2size = "275";
var top2size = "305";
}
else
{
var topsize = "200";
var top2size = "250";
var top3size = "280";
}


//Comment: This splits the URL so only the part of donor= is displayed
var a = document.URL.split("?donor="); // split at protocol
a = (a[1] ? a[1] : a[0]).split("?donor=");
url = a.join("\n"); 



//Comment: Replaces ': ' with a forced line return
var text = url.replace(/:/g , "<br/>");

//Comment: inserts a space into the text for every space (%20) in the URL
var text = text.replace(/%20/g , " ");

//Comment: allows single quote marks to be inserted into the text
var text = text.replace(/%27/g , "'");

//Comment: Diacritic replacement
var text = text.replace(/%C3%B1%/g , "\u00F1");

//Comment: Diacritic replacement
var text = text.replace(/C3%B3/g , "\u00F3");

//Comment: Diacritic e replacement
var text = text.replace(/%E9/g , "\u00e9");

//Comment: Diacritic apostrophe replacement
var text = text.replace(/%92/g , "\u02bc");

//alert (text);

var textlength=text.length;
if (textlength>100)
{

var font="120"
}
else
{
var font="135"
}


//Comment: Draws a web page and inserts the bookplate image and URL text
document.write('<html><style type="text/css">.gift{position:absolute; left: 95px; text-align:center;font-size:');
document.write(font);
document.write('%;font-family: Book Antiqua;width:280px;top:');
document.write(topsize);
document.write('px;} </style><body>');

//Comment: The image is currently inthe same directory as the other 2 files but that can be changed if necessary
document.write('<div id="content" style="position:absolute; left:250px; top:20px;"><img src="exlibris-web.jpg">');
document.write('<p class="gift">');
document.write(text);
document.write('</p></div>');
document.write('</html></body>');
}

