From 61bfe2d70cae6be8c4086a210a5451135ccca9ea Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 2 Aug 2008 08:21:29 +0000 Subject: added doc tool --- docs/tool/Help/javascript/PNGHandling.js | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 docs/tool/Help/javascript/PNGHandling.js (limited to 'docs/tool/Help/javascript/PNGHandling.js') diff --git a/docs/tool/Help/javascript/PNGHandling.js b/docs/tool/Help/javascript/PNGHandling.js new file mode 100644 index 00000000..ab47a538 --- /dev/null +++ b/docs/tool/Help/javascript/PNGHandling.js @@ -0,0 +1,72 @@ +// Parts derived from: +// Opacity Displayer, Version 1.0 +// Copyright Michael Lovitt, 6/2002. +// Distribute freely, but please leave this notice intact. +// http://www.alistapart.com/articles/pngopacity/ + +// Parts derived from: +// Natural Docs +// Copyright (C) 2003-2004 Greg Valure +// http://www.naturaldocs.org/ + + +var pngTransform; +var pngNormal; + +var agt=navigator.userAgent.toLowerCase(); + +if (agt.indexOf("opera") != -1) + { + if ( (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1) && + agt.indexOf("mac") != -1) + { + pngNormal = 1; + } + else if (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1 || + agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1) + { + pngNormal = 1; + } + } + +else if (agt.indexOf("msie") != -1) + { + if (agt.indexOf("msie 5.5") != -1 || agt.indexOf("msie 6") != -1) + { + if (agt.indexOf("mac") != -1) + { pngNormal = 1; } + else if (agt.indexOf("win") != -1) + { pngTransform = 1; }; + } + + else if (agt.indexOf("msie 5") != -1) + { + if (agt.indexOf("mac") != -1) + { pngNormal = 1; }; + } + + else if (agt.indexOf("msie 7") != -1) + { pngNormal = 1; } + } + +else if (agt.indexOf("gecko") != -1) + { + pngNormal = 1; + } + + +function PNGGIF(strPath, intWidth, intHeight, strAlt, strID) + { + if (pngTransform) + { + document.write('
'); + } + else if (pngNormal) + { + document.write(''+strAlt+''); + } + else + { + document.write(''+strAlt+''); + } + }; -- cgit 1.4.1