home *** CD-ROM | disk | FTP | other *** search
- function CopyExample(codeID)
- {
- var appVer = IEVersion();
-
- if (appVer < 5)
- {
- alert("This feature is available in script as of Microsoft« Internet Explorer 5!");
- }
- else
- {
- window.clipboardData.setData("Text", codeID.innerText);
- }
- }
-
- function RunExample(FileName,MinIEVer)
- {
- var appVer = IEVersion();
- if (MinIEVer > appVer)
- {
- window.navigate("IEVerMsg.htm");
- }
- else
- {
- window.navigate(FileName);
- return true;
- }
- }
-
- function IEVersion()
- {
- var appVer=navigator.appVersion, msie=appVer.indexOf("MSIE ");
-
- return parseFloat( appVer.substring( msie+5, appVer.indexOf(";",msie)));
- }
-
- //Sends XML form in mail message.
- function GetTitle()
- {
- var doc, j, i, len, heading, title, tagName;
- var doc = window.document.all(0).document;
-
- len = doc.all.length;
-
- for (i = 0; i < len; i++)
- {
- tagName = doc.all(i).tagName;
- if (tagName == "TITLE")
- //Get Title
- {
- var heading = doc.all(i);
- title = heading.text;
- //title = title.fromCharCode(34) + title + title.fromCharCode(34);
- }
- }
- var re = new RegExp('\"',"g")
- title = title.replace(re,"");
- var re = new RegExp("'","g")
- title = title.replace(re,"-");
- if (title == "")
- {
- title = "Documentation Feedback";
- }
- return title
- }
-
- function ParseFileName(Filename)
- {
- var newFileName;
- var intPos = Filename.lastIndexOf("\\");
- var intLen = Filename.length;
- newFileName = Filename.substr(intPos + 1, intLen - intPos)
-
- return(newFileName);
- }
-
- function hideWindow()
- {
- if(feedbackarea.style.display === "none")
- {
- feedbackarea.style.display = "block";
- document.all.feedbackarea.scrollIntoView(true);
- }
- else
- {
- feedbackarea.style.display = "none";
- }
- }
-
- function GetRating()
- {
- for(var i=0;i< document.frmFeedback.rbtnRating.length;i++)
- {
- if(document.frmFeedback.rbtnRating(i).checked)
- {
- return (i+1);
- }
- }
- return (0);
- }
-
-
- function fnGatherInfo()
- {
- var tTitle=GetTitle();
- var tLocation=ParseFileName(window.location.href);
- var tMailTo="mailto:BeeGrid.help.feedback@stinga.com";
-
- var d = String.fromCharCode(34);
- var s = String.fromCharCode(39);
- var cr = String.fromCharCode(11);
-
- var tMailContent="<A HREF=" + d + tMailTo + d + " ONCLICK=" + d + "this.href=" + s + tMailTo + "?subject=" + tTitle + " (" + tLocation + ")" + "&body=" + "<XML>" + cr + "<DocFeedback>" + cr + "<Title>" + s + " + GetTitle() + " + s + "</Title>" + cr + "<URL>" + tLocation + "</URL>" + cr + "<UserComment>" + s + " + document.frmFeedback.txtUserComment.value + " + s + "</UserComment>" + cr + "<UserRating>" + s + " + GetRating() + " + s + "</UserRating>" + cr + "</DocFeedback>" + cr + "</XML>" + s + ";" + d + "><B>Submit feedback</B></A>";
-
- return(tMailContent);
- }
-
- function EMailStream(obj)
- {
-
- var stream;
- tMailLocation=fnGatherInfo();
- pageHref=window.location.href;
-
- if(document.body.innerHTML.search(/frmFeedback/) != -1)
- {
- hideWindow();
- }
- else
- {
- stream = "<DIV ID='feedbackarea' class=clsFeedback>";
-
- stream = stream + "<H4>Do you have feedback about this topic?</H4>";
-
- stream = stream + "<P>Please, send us e-mail with your suggestions and comments about our documentation"
- stream = stream + " and samples. You can do it using the form below.</P>"
-
- stream = stream + '<FORM NAME="frmFeedback">';
- stream = stream + '<UL Type=1><LI><img style=vertical-align:bottom; src=Rank.png> Rate this topic (1-5): ';
- stream = stream + '<INPUT TYPE="radio" value="1" NAME="rbtnRating">';
- stream = stream + '<INPUT TYPE="radio" value="2" NAME="rbtnRating">';
- stream = stream + '<INPUT TYPE="radio" value="3" NAME="rbtnRating">';
- stream = stream + '<INPUT TYPE="radio" value="4" NAME="rbtnRating">';
- stream = stream + '<INPUT TYPE="radio" value="5" NAME="rbtnRating">';
- stream = stream + "<LI><img style=vertical-align:bottom; src=Note.png> Enter your feedback here:";
- stream = stream + '<TEXTAREA TYPE=text ACCESSKEY="M" COLS=35 ROWS=3 NAME="txtUserComment" style="position: relative; width: 85%">';
- stream = stream + '</TEXTAREA>';
- stream = stream + "<LI><span onclick='hideWindow()'><img style=vertical-align:bottom; src=SendMail.png> " + tMailLocation + "</span>"
- stream = stream + '</UL></FORM>';
-
- stream = stream + "<P>Thank you for your feedback!</P>"
-
- stream = stream + "<P align=right><A class=clsLink HREF=" + pageHref + ">Back to topic</A></P>";
-
- stream = stream + "<P> </P>";
-
- stream = stream + "</div>";
-
- obj.innerHTML = stream;
- document.all.feedbackarea.scrollIntoView(true);
-
- return stream;
- }
- }
-