﻿
function fav()
{
if (document.all)
	window.external.AddFavorite('http://www.find-book.co.uk/', 'UK Cheap Books');
else
	alert("Sorry. Netscape users must bookmark the pages manually by hitting <Ctrl-D>");
}

function eMail() 
{
    var nxt="@find"
    window.location = "mail"+"to:info"+nxt+"-book"+".co.uk"
}



function ValidatePrice(oPrice)
{
    
    oPriceVal = document.getElementById(oPrice).value;
    
     if (isNaN(oPriceVal) || oPriceVal == "") 
     {
        alert('Must be numerical');
        return false;
     }
     else 
     {
        if (oPriceVal.indexOf('.') == -1) 
        {
            return true;
        }
        else 
        {
            dectext = oPriceVal.substring(oPriceVal.indexOf('.')+1, oPriceVal.length);
            if (dectext.length > 2)  
            {
                alert('No more than 2 digits after the decimal point');
                return false;
            }
            else
            {
                return true;
            }
        }
    }
}


function ConfirmDelete()
{
    var blnConf = confirm("Are you sure you wish to delete this item from your watch list?");
    
    return blnConf;
}
