/////////////////////////////////////////////////////////////////////////////// // // This code taken from: // http://www.aspandjavascript.co.uk/javascript/javascript_api/ // // // Conditions of Use (from http://www.aspandjavascript.co.uk/about/conditions.asp) // // The Begging Bowl // ================ // Though the code on the site is free, building, testing and maintaining dHTML // code is a nasty laborious business and takes up a lot of time. If you use // code from ASPAndJavaScript.co.uk in a commercial website, or for a paying // client or use software from the site in a commercial environment, we politely // invite you to consider making a donation of $20 (or whatever you consider // appropriate) to help support the site. // // Donations can be made through PayPal using the button on the left of the page, // or "in kind" through our Amazon Wish List (click the link and search for // jamesdoz@hotmail.com). Donations go towrds the hosting costs of the site. // // You can also offer support by visiting our sister site ComputerBookPrices.com // and using the price comparison system to find great deals on computer books // and manuals. // // // Copyright // ========= // All code available on this site is copyrighted to James Austin (unless // otherwise stated) and must retain any copyright messages. // // // Disclaimer // ========== // All code on the site is available to download for free. No liability is // accepted for any loss or damage, financial or otherwise arising from the // viewing or use of this web site or any of its contents. // // // Technical Support // ================= // As stated above, we accept no liability for the contents of the site and do // not guarantee to offer technical support for it. We do, however, appreciate // feedback and always try to answer any questions and queries as thouroughly // as time allows. // // If you have problems using the code or just questions about how it all works, // please contact us at jamesdoz@hotmail.com, bug reports can be submitted to // the same address // // Please include as much information as possible with your query, such as // operating system, browser etc. Error messages and screenshots (where // applicable) are helpful too. // /////////////////////////////////////////////////////////////////////////////// function sniffBrowsers() { var ns4 = document.layers; var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1) ||(navigator.userAgent.indexOf("Opera/5")!=-1); var op6 = (navigator.userAgent.indexOf("Opera 6")!=-1) ||(navigator.userAgent.indexOf("Opera/6")!=-1); var agt=navigator.userAgent.toLowerCase(); var mac = (agt.indexOf("mac")!=-1); var ie = (agt.indexOf("msie") != -1); var mac_ie = mac && ie; } function getStyleObject(objectId) { if(document.getElementById && document.getElementById(objectId)) { return document.getElementById(objectId).style; } else if (document.all && document.all(objectId)) { return document.all(objectId).style; } else if (document.layers && document.layers[objectId]) { return getObjNN4(document,objectId); } else { return false; } } function changeObjectVisibility(objectId, newVisibility) { var styleObject = getStyleObject(objectId, document); if(styleObject) { styleObject.visibility = newVisibility; return true; } else { return false; } } function findImage(name, doc) { var i, img; for (i = 0; i < doc.images.length; i++) { if (doc.images[i].name == name) { return doc.images[i]; } } for (i = 0; i < doc.layers.length; i++) { if ((img = findImage(name, doc.layers[i].document)) != null) { img.container = doc.layers[i]; return img; } } return null; } function getImage(name) { if (document.layers) { return findImage(name, document); } return null; } function getObjNN4(obj,name) { var x = obj.layers; var foundLayer; for (var i=0;i