

if (document.layers || !document.getElementById || !document.createElement){window.location.href="old_browser.htm";}
var highlight_field = "";
var tooltips = new Array();
tooltips["search_box_top"] = "Here is the tooltip!!";
tooltips["occID"] = "Choose the occasion you want to buy flowers for!";
tooltips["price"] = "Choose the price range to find flowers within your budget!";
tooltips["styleID"] = "Choose what type of flowers you would like to buy!";
tooltips["member_discount"] = "You can save &pound;1.00 per order by registering your details and logging in to make your purchase!";
tooltips["product_wrapping_msg"] = "In most of our images we show just the flowers, so you can see more clearly the flowers and the variety we use.  With regard to the wrapping of the flowers, we are constantly updating and changing the fabrics, cellophanes, ribbons and materials that we use.  This means you get a more personal, individual and stunning style that sets us apart from bigger companies.<br /><br />Thank you for reading!";
if (typeof(AttachOnload) != "function")
{
function AttachOnload(MyFunction)
{
if (window.attachEvent)
window.attachEvent("onload", MyFunction);
else if (window.addEventListener)
window.addEventListener("load", MyFunction, false);
}
}
// attach functions to run on an object's (OBJ) event (EVT)
if (typeof(AttachEvent) != "function")
{
function AttachEvent(obj, evt, MyFunction)
{
if (typeof(obj) == "string") obj = document.getElementById(obj);
evt = evt.replace(/^on/i,"");
if (obj.attachEvent)
obj.attachEvent("on" + evt, MyFunction);
else if (obj.addEventListener)
obj.addEventListener(evt, MyFunction, false);
}
}
// attaches a style to the page e.g. AttachStyle("#wrapper", "width:500px");
if (typeof(AttachStyle) != "function")
{
function AttachStyle(to, what){
// IE of course needs its own version
if (document.createStyleSheet){
var obj = document.createStyleSheet();
return obj.addRule(to, what);
}
// for the good browsers
var head = document.getElementsByTagName("head")[0];
var obj = document.createElement("STYLE");
if (obj && head){
obj.setAttribute("type", "text/css");
var entry = document.createTextNode(to + "{" + what + "}");
if (obj.appendChild && head.appendChild){
obj.appendChild(entry);
head.appendChild(obj);
}
}
}
}
document.getObjectsInObject = function(objectName, objectSearch)
{
objectSearch = objectSearch.toUpperCase();
var container = this.getElementById(objectName);
var arr = new Array();
if (container && container.hasChildNodes())
{
for (var i = 0;i < container.childNodes.length;i++)
{
var tagName = container.childNodes[i].tagName || "";
if (tagName.toUpperCase() == objectSearch)
arr.push(container.childNodes[i]);
}
}
return arr;
}
function CrossBrowserSupport()
{
var ua = navigator.userAgent.toLowerCase();
var sf = ua.indexOf("safari") > -1 && ua.indexOf("mac") > -1;
if (sf)
{
// find all text-less buttons and add text to them...
var inputs = document.getElementsByTagName("INPUT");
for (var i = 0;i < inputs.length;i++)
{
if (inputs[i].type == "submit")
{
if ((inputs[i].value == "" || inputs[i].value == " ") && inputs[i].title != "")
{
inputs[i].value = inputs[i].title;
//						inputs[i].style.width = Math.max(parseInt(inputs[i].title.length * 1.5), 1) + "em";
inputs[i].style.width = "auto";
inputs[i].style.height = "1.5em";
inputs[i].style.marginRight = "0";
}
}
}
}
}
// Check for targetblank
function makeLinksPopup(){
convertLinks("a");// Links
convertLinks("area");// Image Maps
}
function convertLinks(tagType){
var targets = document.getElementsByTagName(tagType);
if (targets){
for (var i = 0;i < targets.length;i++){
if (targets[i].rel){
if (targets[i].rel == "targetblank"){
targets[i].target = "_blank";
}
}
}
}
}
function LoadToolTips()
{
var obj;
for (var i in tooltips)
{
obj = document.getElementById(i);
if (obj)
{
if (obj.attachEvent)
{
obj.attachEvent("onmouseover", DoOnMouseover);
obj.attachEvent("onmouseout", DoOnMouseout);
}
else if (obj.addEventListener)
{
obj.addEventListener('mouseover', DoOnMouseover, false);
obj.addEventListener('mouseout', DoOnMouseout, false);
}
}
}
}
function DoOnMouseover()
{
var src_id;
var obj;
if (window.event)
{
if (event.srcElement)
{
obj = event.srcElement;
if (obj)
src_id = obj.id;
}
}
else if (this.id)
{
src_id = this.id;
obj = document.getElementById(src_id);
}
if (tooltips[src_id])
{
if (obj) obj.title = "";
return overlib(tooltips[src_id], CENTER, OFFSETY, 30);//);
}
else
return false;
}
function DoOnMouseout()
{
return nd();
var src_id;
if (window.event)
{
if (event.srcElement)
{
var obj = event.srcElement;
if (obj)
src_id = obj.id;
}
}
else if (this.id)
src_id = this.id;
if (tooltips[src_id])
return overlib(tooltips[src_id], CENTER, OFFSETY, 30);//, OFFSETX, -100);//, CSSSTYLE, STICKY, CAPTION, 'CSSSTYLE Example',CAPTIONSTYLE, 'italic',CLOSEWEIGHT, 'bold', CLOSEDECORATION, 'line-through',  CLOSESIZE, 9, CLOSECOLOR, '#ffffff', CLOSECLICK);
else
return false;
}
function CheckMenuLineHeights()
{
var nav = document.getElementById("nav");
var nav_links = nav.getElementsByTagName("a");
var nav_link_lineHeight = 30;
if (nav_links.length > 0)
{
for (i = 0;i < nav_links.length;i++)
{
if (nav_links[i].offsetHeight)
{
if (nav_links[i].offsetHeight > nav_link_lineHeight)
{
nav_links[i].style.lineHeight = parseInt(nav_link_lineHeight / Math.ceil(nav_links[i].offsetHeight / nav_link_lineHeight)) + "px";
}
if (nav_links[i].offsetHeight < nav_link_lineHeight)
{
nav_links[i].style.lineHeight = nav_link_lineHeight + "px";
}
}
}
/*for (var i in nav_links)
{
}*/
}
}
function overlib_wrapper(text, evt)
{
if (!text) return true;
if (evt)
{
var obj = 0;
if (evt.srcElement)
obj = evt.srcElement;
else if (evt.target)
obj = evt.target;
if (obj) obj.title = "";
}
return overlib(text, CENTER, OFFSETY, 30);
}
function GetClientWidth()
{
var w = 0;
if (window.innerWidth)
return window.innerWidth;
else
{
if (document.documentElement)
{
if (document.documentElement.clientWidth)
w = document.documentElement.clientWidth;
}
if (!w && document.body.clientWidth)
w = document.body.clientWidth;
}
return w;
}
function getElementsByClassName(element,className)
{
if (element) element = "DIV";
var return_array = new Array();
var n = 0;
var elements = document.getElementsByTagName(element);
for (var i = 0;i < elements.length;i++)
{
if (elements[i])
{
if (elements[i].className)
{
if (String(elements[i].className).match(className))
return_array[n++] = elements[i];
}
}
}
return return_array;
}
function basketDeliveryDate(year, month, day)
{
document.getElementById('deldate').innerHTML=day+"/"+month+"/"+year;
document.getElementById("deliverydate").value=year+"-"+month+"-"+day;
window.location.hash = "choosesize";
}
function calendarSwap(one, two)
{
document.getElementById('calendarID_'+one).style.display='none';
document.getElementById('calendarID_'+two).style.display='block';
}
function CheckForHighlight()
{
if (highlight_field != "")
{
var theField = document.getElementById(highlight_field);
if (theField)
{
if (theField.style)
{
theField.focus();
theField.style.border = "#C00000 1px solid";
theField.style.backgroundColor = "#EBD9D9";
}
}
}
}
function NoDelivery()
{
alert("Unfortunately we are unable to delivery on this date!\n\nIf you need flowers today, try our Same Day section!");
}
function ToggleWrapping(hide)
{
var wrapping = document.getElementById("wrapping");
if (wrapping) wrapping.style.display = hide ? "none" : "block";
}
function ToggleCatDesc(hide_extended)
{
var product_desc = document.getElementById("catdesc_extended");
var product_desc_full = document.getElementById("catdesc_extended_full");
if (product_desc) product_desc.style.display = hide_extended ? "block" : "none";
if (product_desc_full) product_desc_full.style.display = hide_extended ? "none" : "block";
}
function CheckForSmallScreen()
{
if (screen.width >= 1280) return;
AttachStyle("#menu_offers", "display: none;");
AttachStyle("#body", "margin-right: 10px;");
AttachStyle("#screen800wrap", "display: inline;");
}
function AddOverLibs()
{
var divs = getElementsByClassName("div", "flower_brief");
for (var i = 0;i < divs.length;i++)
{
var div = divs[i];
if (!div) continue;
// get brief...
var subdivs = div.getElementsByTagName("div");
var subdiv = null;
for (var j = 0;j <= subdivs.length;j++)
{
var subdiv = subdivs[j];
if (subdiv && String(subdiv.className).match(/flower_brief_brief/i)) break;
subdiv = null;
}
// get date
var ps = div.getElementsByTagName("p");
var p = null;
for (var j = 0;j <= ps.length;j++)
{
var p = ps[j];
if (p && String(p.className).match(/on_or_after/i)) break;
p = null;
}
if (p && subdiv)
{
var brief = subdiv.innerHTML;
while (brief.match(/\r/)) brief = brief.replace(/\r/,'');
while (brief.match(/\n/)) brief = brief.replace(/\n/,'<br>');
while (brief.match(/\"/)) brief = brief.replace(/\"/,'&#034;');
while (brief.match(/\\/)) brief = brief.replace(/\\/,'\\\\');
var date = p.innerHTML;
date = date.replace(/on or after/i,'Delivery on or after');
var html = brief + '<p style=\"margin-top:0.5em\">' + date + '</p>';
while(html.match(/\'/)) html = html.replace(/\'/,'');
if (div.title)
{
html = '<p style=\"font-weight:bold;font-size:110%;\">' + div.title + '</p>' + html;
div.title = "";
}
eval("var f = function (){return overlib_wrapper('" + html + "');}");//, event);}");
div.onmouseover = f;
div.onmouseout = function (){return nd();}
}
}
}
function AddOverLibAccessory(summaryID, objID)
{
var summary = document.getElementById(summaryID);
var obj = document.getElementById(objID);
if (obj)
{
obj.onmouseover = function (){return true;}
obj.onmouseout = function (){return true;}
}
if (!obj || !summary) return;
var html = summary.innerHTML;
while (html.match(/\r/)) html = html.replace(/\r/,'');
while (html.match(/\n/)) html = html.replace(/\n/,'');
while (html.match(/\"/)) html = html.replace(/\"/,'&#034;');
while (html.match(/\\/)) html = html.replace(/\\/,'\\\\');
while (html.match(/\'/)) html = html.replace(/\'/,'&#039;');
eval("var f = function (){return overlib_wrapper('" + html + "');}");//, event);}");
obj.onmouseover = f;
obj.onmouseout = function (){return nd();}
}
function AddOverLibsAccessoriesMore()
{
var accessory_groups = getElementsByClassName("div", "accessories");
if (!accessory_groups) return;
for (var i = 0;i < accessory_groups.length;i++)
{
var group = accessory_groups[i];
if (!group) continue;
var accessories = group.getElementsByTagName("div");
for (var j = 0;j < accessories.length;j++)
{
var accessory = accessories[j];
// get summary
var spans = accessory.getElementsByTagName("span");
for (var k = 0;k < spans.length;k++)
{
var span = spans[k];
if (!span.className.match(/accessory_summary/i)) continue;
// add overlib item	to row
AddOverLibAccessory(span.id, accessory.id);
break;
}
}
}
}
function AddOverLibsAccessories()
{
var table_accessories = document.getElementById("table_accessories");
if (!table_accessories) return;
var rows = document.getElementsByTagName("tr");
for (var i = 0;i < rows.length;i++)
{
var row = rows[i];
if (!row) continue;
// get summary
var spans = row.getElementsByTagName("span");
for (var j = 0;j < spans.length;j++)
{
var summary = spans[j];
if (!summary.className.match(/accessory_summary/i)) continue;
// add overlib item	to row
AddOverLibAccessory(summary.id, row.id);
break;
}
}
}
AttachOnload(makeLinksPopup);
AttachOnload(ToggleCatDesc);
AttachOnload(ToggleWrapping);
AttachOnload(LoadToolTips);
AttachOnload(CheckForHighlight);
//AttachOnload(CheckMenuLineHeights);
AttachOnload(CrossBrowserSupport);
AttachOnload(AddOverLibs);
AttachOnload(AddOverLibsAccessories);
AttachOnload(AddOverLibsAccessoriesMore);
function HandleError(){return true;}
window.onerror = HandleError;