// Microsoft Dynamics NAV Documentation Feedback Script
// Last updated 24 February 2009 11:25
// *****Start: Partner Section************************
var sPartner = "MSFT";//change to your company name
var sRecipient = "mailto:nav-olh@microsoft.com";//append your company's email address. Please leave the Microsoft address as well
// ******End: Partner Section***********************
// *****Start: Localization Section************************
//---Note to localization: Do not change and tags.---
var L_fbLocale_Text = 'RU'; //This is the locale of the content; use the short string values at http://msdn2.microsoft.com/en-us/library/0h88fahh.aspx
var L_fbLink_Text = 'Обратная связь по документации';//--- This is the link text appearing at the bottom of each topic ---
//--- This is the text appearing in the feedback window ---
var L_fbTitle_Text = 'Обратная связь по документации';
var L_fbParagraph_Text = "Была ли эта информация полезной?";
var L_fbValue1_Text = "Да, эта информация оказалась полезной.";
var L_fbValue2_Text = "В этом разделе справки есть техническая ошибка.";
var L_fbValue3_Text = "Я не могу найти того, что искал.";
var L_fbValue4_Text = "Язык или терминология не правильные.";
var L_fbEnterFeedbackHere_Text = 'Чтобы отправить вашу информацию,'; //The text: Click here will be appended here!
var L_fbViewPrivacyStatement_Text = 'Чтобы понять, как будут использованы личные сведения, см.Заявление о конфиденциальности для Microsoft Dynamics NAV.';
var L_fbCancel_Text = 'Отмена';
//--- This is the text appearing in the feedback email body ---
var L_fbTypeHere_Text = '';
var L_fbSubmit_Text = 'щелкните здесь';//This text is appended to "To add comments and send an e-mail with your feedback" above
//--- This text is appended to the text in the feedback email body, which depends on users selection ---
var L_fbQuestion1_Text = "";
var L_fbQuestion2_Text = "";
var L_fbQuestion3_Text = "";
var L_fbQuestionDefault_Text = "";
// ******End: Localization Section***********************
var sProduct = 'Microsoft Dynamics NAV';
var sVersion = '2009 SP1';
var sClassicFolderName = '\\Classic\\' //Set to parent folder containing the CSide docs
function FeedBackLink()
{
document.write('
');
}
function EMailStream(obj)
{
var stream;
stream = ''
+ '
'
+ '
' + L_fbTitle_Text + '
'
+ '
' + L_fbParagraph_Text + '
'
+ '
'
+ '
' + L_fbViewPrivacyStatement_Text + '
'
+ '
' + L_fbEnterFeedbackHere_Text + ' '
+ ''+ submitFeedback() + '
'
+ '
' + L_fbCancel_Text
+ '
'
+ '
'
+ '
'
+ '
';
obj.innerHTML = stream;
// Scroll to the bottom, after a delay
window.setTimeout('scrollToBottom()',50);
}
function ShowFeedback()
{EMailStream(fb);document.getElementById('fbb').style.display='none';};
function submitFeedback()
{
var sTitle = ParseTitle(document.title);
var sHTM = ParseFileName(window.location.href);
var sClientName = ParseClientName(window.location.href)
var sSubject = '[' + sProduct + '] ' + '[' + sVersion + '] ' + '[' + L_fbLocale_Text + '] ' + '[' + sClientName + '] ' + '[' + sPartner + '] ' +
'[' + sHTM + '] ' + '[' + sTitle + '] ' + '[' + '\' + GetRating() + \'' + '-Class]';
var sEntireMailMessage = sRecipient + '?subject=' + sSubject
+ '&body=' + L_fbTypeHere_Text + '\' + GetQuestion() + \'';
var sHREF = ''+L_fbSubmit_Text+'' + '.';
return sHREF;
}
//---Parses document title.---
function ParseTitle(theTitle)
{
theTitle = theTitle.replace(/\"/g,"--");
theTitle = theTitle.replace(/'/g,"-");
if (theTitle == "") {theTitle = "Documentation Feedback";}
if (theTitle.length > 60) {theTitle = theTitle.slice(0,57) + "...";}
return theTitle;
}
//---Parses document filename.---
function ParseFileName(Filename)
{
var intPos = Filename.lastIndexOf("\\");
var intLen = Filename.length;
var newFileName = Filename.substr(intPos + 1, intLen - intPos);
// Look for the last forward slash, and any pound symbol
var x = newFileName.lastIndexOf("/") + 1;
var y = newFileName.lastIndexOf("#");
if(y == (-1))
{
// There is no pound symbol (#)
newFileName = newFileName.slice(x);
}
else
{
newFileName = newFileName.slice(x,y);
}
return(newFileName);
}
//---Parse Client Name----
function ParseClientName(Filename)
{
var y = Filename.lastIndexOf(sClassicFolderName);
if(y == (-1))
{
// HTM not in a path containing sClassicFolderName
sClientName = "RTC";
}
else
{
sClientName = "CSide";
}
return(sClientName);
}
function GetRating()
{
sRating = "0";
for(var x = 0;x < 3;x++)
{
if(document.formRating.fbRating(x).checked) {sRating = x + 1;}
}
return sRating;
}
function GetQuestion()
{
var rating = GetRating();
var question;
if(rating == "1")
{
question = L_fbQuestion1_Text;
}
else if(rating == "2")
{
question = L_fbQuestion2_Text;
}
else if(rating == "3")
{
question = L_fbQuestion3_Text;
}
else
{
question = L_fbQuestionDefault_Text;
}
return question;
}
//---Reloads window.---
function fbReload()
{
window.location.reload(true);
}
//---Scrolls to the bottom of the window.---
function scrollToBottom()
{
window.scrollBy(0,20000);
}