﻿// JScript File



function getViewportDimensions()
{
 var heightValue = 0;
 widthValue = 0;

 if ( window.innerHeight )
 {
  heightValue = window.innerHeight;
  widthValue = window.innerWidth;
 }
 else if ( (document.documentElement) && (document.documentElement.clientHeight) )
 {
  heightValue = document.documentElement.clientHeight;
  widthValue = document.documentElement.clientWidth;
 }
 else if ( (document.body) && (document.body.clientHeight) )
 {
  heightValue = document.body.clientHeight;
  widthValue = document.body.clientWidth;
 }

 return { Height: parseInt(heightValue, 10), Width: parseInt(widthValue, 10) }; 
}
var valResolution ;          
var FscreenW ;          
var helpW  ;        
var printW;
var heightImg;
var arrowH ;
var arrowW1; 
var arrowW2;
function setToolBar(width)
    {
        if (width < 1250)
        {
            valResolution = "1024";            
            FscreenW = "17";           
            helpW="20";            
            printW="17";
            heightImg = "26";
            arrowH = "12";
            arrowW1 = "9";
            arrowW2 = "12";

        }
        else if (width < 1370)
        {
            
            valResolution = "1280";            
            FscreenW = "21";           
            helpW="24";            
            printW="20";
            heightImg = "32";
            arrowH = "14";
            arrowW1 = "11";
            arrowW2 = "15";
        }
        else if (width < 1570)
        {
            valResolution = "1400";
            
             FscreenW = "22";           
            helpW="24";            
            printW="21";
            heightImg = "35";
            arrowH = "14";
            arrowW1 = "11";
            arrowW2 = "15";
        }
        else 
        {
            valResolution = "1600";            
            FscreenW = "26";           
            helpW="29";            
            printW="25";
            heightImg = "40";
            arrowH = "17";
            arrowW1 = "14";
            arrowW2 = "18";
        }
       
    } 

function ORW()
{   
    page=document.getElementById("pgno").value;
    mode=document.getElementById("mode").value ;
    var num = window.location.href.indexOf("?");
    var url = window.location.href.substring(0,num)
    //alert("hi6"+screen.width);
	var n='w'+Math.round(Math.random()*(1000000000));w=screen.width;h=screen.height-30;nurl=url+"?fs=2&pg="+page+"&mode="+mode; 
	w=window.open(nurl,n,'toolbar=no,menubar=no,resizable=yes,scrollbars=no,left=0,top=0,width='+w+',height='+h);
	//w=window.open(nurl,n,'toolbar=no,menubar=no,fullscreen=yes,left=0,top=0,width='+w+',height='+h);
  }
function CRW()
{ 
    page=document.getElementById("pgno").value;
    mode=document.getElementById("mode").value ;
//    var num = window.location.href.indexOf("?");
//    var url = window.location.href.substring(0,num)
    //window.opener.location.replace(url+"?pg="+page+"&mode="+mode) 
    var detailUrl = window.opener.document.getElementById("detail").src;//="fullimage1.aspx?pgno="+ pgno +" &mode=" + mode+"&Sresolution=" + windowWidth +"&Standardview=" + standardview +"&Magnifiedview=" + magnifiedview+ "&clintheight=" + windowHeight + '&clintwidth=' + windowWidth + "&fitheight="+ parent.document.getElementById("fitheight").value;;
   
    var a = detailUrl.indexOf("pgno=");			
    a = a+5;
    var b = detailUrl.indexOf("&mode=");	

    var oldPageNo = detailUrl.substring(a,b);
    oldPageNo = trim(oldPageNo);
   
    detailUrl =  detailUrl.replace("pgno="+oldPageNo,"pgno="+page);
   //set mode
    b = detailUrl.indexOf("&mode=");	
    var c = b+6;
    var oldMode = detailUrl.substring(c, c+1)
    detailUrl = detailUrl.replace("mode="+oldMode,"mode="+mode);
    window.opener.document.getElementById("detail").src =detailUrl;

    //to set opener window page drop down value
    window.opener.document.getElementById("ToolBar_ddPages").value=page;
//    if(! window.opener.location.hash ||  window.opener.location.hash.indexOf("#pg") != 0)   
//    {
//        window.opener.location.hash='pg1';
//    }
//    else
//    {   
//         window.opener.location.hash = "pg"+pgno;
//    }

    window.close();

    //window.open(window.location.href);
}
function LTrim( value ) {
     	var re = /\s*((\S+\s*)*)/;
     	return value.replace(re, "$1");
     }     
    // Removes ending whitespaces
    function RTrim( value ) {
    	var re = /((\s*\S+)*)\s*/;
    	return value.replace(re, "$1");
    }
    
    // Removes leading and ending whitespaces
    function trim( value ) {	
    	return LTrim(RTrim(value));
    	
    }
// -->




function drawToolbar()
{ 
var dimensionsObject = getViewportDimensions();
var sWidth = dimensionsObject.Width;
var screenHeight = dimensionsObject.Height;    
     
setToolBar(sWidth);

var imagePath = document.getElementById("ToolBar_hImagePath").value + valResolution;
var logoHostPath = document.getElementById("ToolBar_hlogoHostPath").value
var LogoLinks = document.getElementById("ToolBar_hLogoLinks").value;
var hfullAccess = document.getElementById("ToolBar_hfullAccess").value;
var hfullscreen =  document.getElementById("ToolBar_hfullscreen").value;
var hRightLogoLink =  document.getElementById("ToolBar_hRightLogoLink").value;

var Features = document.getElementById("ToolBar_hFeatures").value;
var drFeatues = Features.split(":");



var str = "<div class='outer" + valResolution + "' ><div class='Patch" + valResolution + "'></div>";
//left menu
if ((drFeatues[0] == "N"))
    {  str = str+ "<div class='leftLogo" + valResolution + "'><img border='0' src='"+ logoHostPath + valResolution +  "/Logo.jpg' /></div>";    }
else
    { str = str+"<div class='leftLogo" + valResolution + "'><a href=\"javascript:openReSizableWindow('" + LogoLinks + "','Link');\"><img  border='0'  src='"+ logoHostPath + valResolution +  "/Logo.jpg' /></a></div>";    }

 str = str+"<div class='leftMenu" + valResolution + "'>";
 //********Thumbnails*******
        str = str+"<div class='leftMenuTxt" + valResolution + "'>";
        if ((drFeatues[6]== "N"))
        {
             str = str+"Thumbnails</div>";
        }
        else
        {
             str = str+"<a class='topbar' href='javascript:handleThumbsClick();' title='View Pages as Thumbnails'>Thumbnails</a></div>";
        }
         str = str+"<div class='menuDivider" + valResolution + "'></div>";
         str = str+"<div class='leftMenuTxt" + valResolution + "'>";

//********Search*******
        if ((drFeatues[7] == "N"))
        {
             str = str+"Search</div>";
        }
        else
        {
             str = str+"<a class='topbar' href=\"javascript:auf('find_dialog');\" title='Search'>Search</a></div>";
        }
         str = str+"<div class='menuDivider" + valResolution + "'></div>";
         str = str+"<div class='leftMenuTxt" + valResolution + "'>";
 
//********Contents*******

        if ((drFeatues[8] == "N"))
        {
             str = str+"Contents</div>";
        }
        else
        {
             str = str+"<a class='topbar' href='javascript:OpenContent();' title='View Content Page'>Contents</a></div>";
        }
         str = str+"<div class='menuDivider" + valResolution + "'></div>";
         str = str+"<div class='leftMenuTxt" + valResolution + "'>";

        //********Settings*******
        if ((drFeatues[10] == "N"))
        {  str = str+"Settings</div>"; }
        else
        {  str = str+"<a class='topbar'  href=\"javascript:auf('settings_dialog');\" title='Change view Settings' >Settings</a></div>"; }
    str = str+"</div>";

//************************************************************************************************************
         str = str+"<div class='middleMenu" + valResolution + "'>";
        //********First-page*******
        if (drFeatues[1] == "N")
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><img width='"+arrowW2+"' height='"+ arrowH+"'  src='"+ imagePath+ "/First-page.gif' /></div>";
        }
        else
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><a   onclick='handleFirstPageClick();' ><IMG width='" + arrowW2 + "' height='" + arrowH + "' onmouseover=\"MM_swapImage('First-page','','"+ imagePath+ "/First-page_over.gif',1);\" onmouseout='handlePageSrc()' border='0px' alt='Go to First Page' title='Go to First Page'  id='First-page' name='First-page'  src='"+ imagePath+ "/First-page.gif'  /></a></div>";
        }
        //********previous-page*******
        if (drFeatues[2] == "N")
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><img width='" + arrowW1 + "' height='" + arrowH + "'  src='"+ imagePath+ "/previous-page_btn.gif' /></div>";
        }
        else
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><a href='javascript:handlePreviousPageClick();'><img width='" + arrowW1 + "' height='" + arrowH + "'  border='0px' alt='Go to Previous Page' title='Go to Previous Page' onmouseover=\"MM_swapImage('previous-page','','"+ imagePath+ "/previous-page_btn_over.gif',1);\" onmouseout='handlePageSrc();' id='previous-page'  src='"+ imagePath+ "/previous-page_btn.gif' /></a></div>";
        }


         str = str+"<div class='middleMenuDropDown" + valResolution + "'>&nbsp;</div>";

        //********Next-page*******
        if (drFeatues[4] == "N")
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><img width='" + arrowW1 + "' height='" + arrowH + "'  src='"+ imagePath+ "/Next-page_btn.gif' /></div>";
        }
        else
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><a href='javascript:handleNextPageClick();'><img width='" + arrowW1 + "' height='" + arrowH + "' border='0px' alt='Go to Next Page' title='Go to Next Page' onmouseover=\"MM_swapImage('Next-page','','"+ imagePath+ "/Next-page_btn_over.gif',1);\" onmouseout='handlePageSrc();' id='Next-page'  src='"+ imagePath+ "/Next-page_btn.gif' /></a></div>";
        }

        //********Last-page*******
        if (drFeatues[5] == "N")
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><img width='" + arrowW2 + "' height='" + arrowH + "' src='"+ imagePath+ "/Last-page.gif' /></div>";
        }
        else
        {
             str = str+"<div class='middleMenuTxt" + valResolution + "'><a href='javascript:handleLastPageClick();'><img width='" + arrowW2 + "' height='" + arrowH + "' border='0px' alt='Go to Last Page' title='Go to Last Page' onmouseover=\"MM_swapImage('Last-page','','"+ imagePath+ "/Last-page_over.gif',1);\" onmouseout='handlePageSrc();' id='Last-page'  src='"+ imagePath+ "/Last-page.gif' /></a></div>";
        }

         str = str+"</div>";

        //************************************************************************************************************
         str = str+"<div class='rightMenu" + valResolution + "'>";
         str = str+"<div class='rightMenuTxt" + valResolution + "'>";

        //********Archive*******
        if ((drFeatues[11] == "N"))
        {  str = str+"Archive</div>"; }
        else
        {  str = str+"<a class='topbar'   href=\"javascript:auf('archives_dialog');\"  title='View Archives' >Archive</a></div>"; }
         str = str+"<div class='menuDivider" + valResolution + "'></div>";
         str = str+"<div class='rightMenuTxt" + valResolution + "'>";

        //********Save*******
            
            if ((drFeatues[12] == "N") || hfullAccess=="false")
          
            {  str = str+"Save</div>"; }
            else
            {  
                 str = str+"<a class='topbar' title='Download PDF' href=\"javascript:auf('download_dialog');\" >Save</a></div>";
           
            }
             str = str+"<div class='menuDivider" + valResolution + "'></div>";
             str = str+"<div class='rightMenuTxt" + valResolution + "'>";
       
        //********Share*******
        if ((drFeatues[13] == "N"))
        {  str = str+"Share</div>"; }
        else
        {  str = str+"<a class='topbar'  href=\"javascript:auf('share_dialog1');\" title='Share Via E-Mail with a Associate'  >Share</a></div>"; }


         str = str+"</div>";

        //************************************************************************************************************************

         str = str+"<div class='rightTool" + valResolution + "'>";
        if (hfullscreen == "2")
        {

             str = str+"<div class='rightToolTxt" + valResolution + "'><a href=\"javascript:CRW();\"><img width=" + FscreenW + " height=" + heightImg + " alt='Exit Full Screen' title='Exit Full Screen' border='0px'  onmouseover=\"this.src='"+ imagePath+ "/Exit-fullscreen_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/Exit-fullscreen.png';\" name='Exit-fullscreen' src='"+ imagePath+ "/Exit-fullscreen.png' /></a></div>";

        }
        else
        {
             str = str+"<div class='rightToolTxt" + valResolution + "'><a href=\"javascript:ORW();\"><img width=" + FscreenW + " height=" + heightImg + "  border='0px' alt='Full Screen' title='Full Screen'  onmouseover=\"this.src='"+ imagePath+ "/fullscreen_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/fullscreen.png';\" name='Fullscreen'  src='"+ imagePath+ "/Fullscreen.png' /></a></div>";
        }
        if ((drFeatues[14] == "N"))
        {
             str = str+"<div class='rightToolTxt" + valResolution + "'><img width=" + printW + " height=" + heightImg + "  border='0px' src='"+ imagePath+ "/Print_btn.gif' /></div>";
        }
        else
        {
             str = str+"<div class='rightToolTxt" + valResolution + "'><a  href=\"javascript:auf('print_dialog');\"><img width=" + printW + " height=" + heightImg + "  border='0px' alt='Print this Page' title='Print this Page' onmouseover=\"this.src='"+ imagePath+ "/Print_btn_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/Print_btn.png';\" name='Print_btn'   src='"+ imagePath+ "/Print_btn.png' /></a></div>";
        }

        if ((drFeatues[15] == "N"))
        {
             str = str+"<div class='rightToolTxt" + valResolution + "'><img width="+helpW +" height="+ heightImg+" src='"+ imagePath+ "/Help_btn.png' /></div>";
        }
        else
        {
             str = str+"<div class='rightToolTxt" + valResolution + "'><a href=\"help.html\" target='_blank'><img width=" + helpW + " height=" + heightImg + "  border='0px' alt='Go to Help Page' title='Go to Help Page' onmouseover=\"this.src='"+ imagePath+ "/Help_btn_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/Help_btn.png';\" name='Help_btn'   src='"+ imagePath+ "/Help_btn.png' /></a></div>";
        }
         str = str+"<div class='rightMenuTxt" + valResolution + "'>";
      
        if (drFeatues[17] == "N")
        {
             str = str+"&nbsp;</div>"; }
        else
        {  str = str+"<a class='topbar'  href=\"javascript:auf('comments_dialog');\" title='Comments'  >Comment</a></div>"; }

         str = str+"</div>";

        //************************************************************************************************************************************
        if (drFeatues[16] == "N")
        {
             str = str+"<div class='rightLogo" + valResolution + "'><img src='"+ imagePath+ "/Qmag-Logo.jpg' /></div>";

        }
        else
        {
             str = str+"<div class='rightLogo" + valResolution + "'><a href=\"javascript:openReSizableWindow('" + hRightLogoLink + "','Link');\"><img border='0'  src='"+ imagePath+ "/Qmag-Logo.jpg' /></a></div>";

        }
         str = str+"<div class='Patch" + valResolution + "'></div>";       
         str = str+"</div><div class='floatNone'></div>";
        document.getElementById("toolBarDiv").innerHTML = str;
 
 
 if ((drFeatues[3] == "N"))
{
    document.getElementById("ToolBar_ImgGoTo").src = imagePath + "/Go.jpg";
    document.getElementById("ToolBar_TxtGoToPage").className = "goToPage" + valResolution;
    document.getElementById("ToolBar_ImgGoTo").className = "goImg" + valResolution;
}
else
{
document.getElementById("ToolBar_ddPages").className = "dropDownPage" + valResolution;
}
 return false;
 }  

function drawToolbarIPad()
{ 
if(window.orientation != undefined)
{   
     switch(window.orientation){    
             case 0: 
             document.getElementById("mode").value = "1";
              valResolution = "portrait";            
                FscreenW = "14";           
                helpW="17";            
                printW="13";
                heightImg = "20";
                arrowH = "13";
                arrowW1 = "16";
                arrowW2 = "16";
                
             break;  
             case 90: 
                valResolution = "landscape";            
                FscreenW = "17";           
                helpW="20";            
                printW="17";
                heightImg = "26";
                arrowH = "17";
                arrowW1 = "21";
                arrowW2 = "21"; 
             break;
             case -90:  
                valResolution = "landscape";            
                FscreenW = "17";           
                helpW="20";            
                printW="17";
                heightImg = "26";
               arrowH = "17";
                arrowW1 = "21";
                arrowW2 = "21"; 
             break;
             }
}
else
{               valResolution = "landscape";            
                FscreenW = "17";           
                helpW="20";            
                printW="17";
                heightImg = "26";
                arrowH = "17";
                arrowW1 = "21";
                arrowW2 = "21"; 
}


var imagePath = document.getElementById("ToolBar_hImagePath").value  + valResolution ;
var logoHostPath = document.getElementById("ToolBar_hlogoHostPath").value
var LogoLinks = document.getElementById("ToolBar_hLogoLinks").value;
var hfullAccess = document.getElementById("ToolBar_hfullAccess").value;
var hfullscreen =  document.getElementById("ToolBar_hfullscreen").value;
var hRightLogoLink =  document.getElementById("ToolBar_hRightLogoLink").value;

var Features = document.getElementById("ToolBar_hFeatures").value;
var drFeatues = Features.split(":");



var str = "<div class='outer' ><div class='Patch'></div>";
//left menu
if ((drFeatues[0] == "N"))
    {  str = str+ "<div class='leftLogo'><img border='0' src='"+ logoHostPath + valResolution +  "/Logo.jpg' /></div>";    }
else
    { str = str+"<div class='leftLogo'><a href=\"javascript:openReSizableWindow('" + LogoLinks + "','Link');\"><img  border='0'  src='"+ logoHostPath + valResolution +  "/Logo.jpg' /></a></div>";    }

 str = str+"<div class='leftMenu'>";
 //********Thumbnails*******
        str = str+"<div class='leftMenuTxt'>";
        if ((drFeatues[6]== "N"))
        {
             str = str+"Thumbnails</div>";
        }
        else
        {
             str = str+"<a class='topbar' href='javascript:handleThumbsClick();' title='View Pages as Thumbnails'>Thumbnails</a></div>";
        }
         str = str+"<div class='menuDivider'></div>";
         str = str+"<div class='leftMenuTxt'>";

//********Search*******
        if ((drFeatues[7] == "N"))
        {
             str = str+"Search</div>";
        }
        else
        {
             str = str+"<a class='topbar' href=\"javascript:auf('find_dialog');\" title='Search'>Search</a></div>";
        }
         str = str+"<div class='menuDivider'></div>";
         str = str+"<div class='leftMenuTxt'>";
 
//********Contents*******

        if ((drFeatues[8] == "N"))
        {
             str = str+"Contents</div>";
        }
        else
        {
             str = str+"<a class='topbar' href='javascript:OpenContent();' title='View Content Page'>Contents</a></div>";
        }
         str = str+"<div class='menuDivider'></div>";
         str = str+"<div class='leftMenuTxt'>";

        //********Settings*******
        if ((drFeatues[10] == "N"))
        {  str = str+"Settings</div>"; }
        else
        {  str = str+"<a class='topbar'  href=\"javascript:auf('settings_dialog');\" title='Change view Settings' >Settings</a></div>"; }
    str = str+"</div>";

//************************************************************************************************************
         str = str+"<div class='middleMenu'>";
       
        //********previous-page*******
        if (drFeatues[2] == "N")
        {
             str = str+"<div class='middleMenuTxt'><img width='" + arrowW1 + "' height='" + arrowH + "'  src='"+ imagePath+ "/previous-page_btn.gif' /></div>";
        }
        else
        {
             str = str+"<div class='middleMenuTxt'><a href='javascript:handlePreviousPageClick();'><img width='" + arrowW1 + "' height='" + arrowH + "'  border='0px' alt='Go to Previous Page' title='Go to Previous Page' onmouseover=\"MM_swapImage('previous-page','','"+ imagePath+ "/previous-page_btn_over.gif',1);\" onmouseout='handlePageSrc();' id='previous-page'  src='"+ imagePath+ "/previous-page_btn.gif' /></a></div>";
        }


         str = str+"<div class='middleMenuDropDown'>&nbsp;</div>";

        //********Next-page*******
        if (drFeatues[4] == "N")
        {
             str = str+"<div class='middleMenuTxt'><img width='" + arrowW1 + "' height='" + arrowH + "'  src='"+ imagePath+ "/Next-page_btn.gif' /></div>";
        }
        else
        {
             str = str+"<div class='middleMenuTxt'><a href='javascript:handleNextPageClick();'><img width='" + arrowW1 + "' height='" + arrowH + "' border='0px' alt='Go to Next Page' title='Go to Next Page' onmouseover=\"MM_swapImage('Next-page','','"+ imagePath+ "/Next-page_btn_over.gif',1);\" onmouseout='handlePageSrc();' id='Next-page'  src='"+ imagePath+ "/Next-page_btn.gif' /></a></div>";
        }
         str = str+"</div>";

        //************************************************************************************************************
         str = str+"<div class='rightMenu'>";
         str = str+"<div class='rightMenuTxt'>";

        //********Archive*******
        if ((drFeatues[11] == "N"))
        {  str = str+"Archive</div>"; }
        else
        {  str = str+"<a class='topbar'   href=\"javascript:auf('archives_dialog');\"  title='View Archives' >Archive</a></div>"; }
         str = str+"<div class='menuDivider'></div>";
         str = str+"<div class='rightMenuTxt'>";

        //********Save*******
            
            if ((drFeatues[12] == "N") || hfullAccess=="false")
          
            {  str = str+"Save</div>"; }
            else
            {  
                 str = str+"<a class='topbar' title='Download PDF' href=\"javascript:auf('download_dialog');\" >Save</a></div>";
           
            }
             str = str+"<div class='menuDivider'></div>";
             str = str+"<div class='rightMenuTxt'>";
       
        //********Share*******
        if ((drFeatues[13] == "N"))
        {  str = str+"Share</div>"; }
        else
        {  str = str+"<a class='topbar'  href=\"javascript:auf('share_dialog1');\" title='Share Via E-Mail with a Associate'  >Share</a></div>"; }


         str = str+"</div>";

        //************************************************************************************************************************

         str = str+"<div class='rightTool'>";
//        if (hfullscreen == "2")
//        {
 str = str+"<div class='rightToolTxt'><img width=" + FscreenW + " height=" + heightImg + "  border='0px' src='"+ imagePath+ "/Fullscreen.png'  /></div>";
   
           //  str = str+"<div class='rightToolTxt'><a href=\"javascript:CRW();\"><img width=" + FscreenW + " height=" + heightImg + " alt='Exit Full Screen' title='Exit Full Screen' border='0px'  onmouseover=\"this.src='"+ imagePath+ "/Exit-fullscreen_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/Exit-fullscreen.png';\" name='Exit-fullscreen' src='"+ imagePath+ "/Exit-fullscreen.png' /></a></div>";

//        }
//        else
//        {
//             str = str+"<div class='rightToolTxt'><a href=\"javascript:ORW();\"><img width=" + FscreenW + " height=" + heightImg + "  border='0px' alt='Full Screen' title='Full Screen'  onmouseover=\"this.src='"+ imagePath+ "/fullscreen_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/fullscreen.png';\" name='Fullscreen'  src='"+ imagePath+ "/Fullscreen.png' /></a></div>";
//        }
//        if ((drFeatues[14] == "N"))
//        {
             str = str+"<div class='rightToolTxt'><img width=" + printW + " height=" + heightImg + "  border='0px' src='"+ imagePath+ "/Print_btn.png' /></div>";
        //}
//        else
//        {
//             str = str+"<div class='rightToolTxt'><a  href=\"javascript:auf('print_dialog');\"><img width=" + printW + " height=" + heightImg + "  border='0px' alt='Print this Page' title='Print this Page' onmouseover=\"this.src='"+ imagePath+ "/Print_btn_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/Print_btn.png';\" name='Print_btn'   src='"+ imagePath+ "/Print_btn.png' /></a></div>";
//        }

        if ((drFeatues[15] == "N"))
        {
             str = str+"<div class='rightToolTxt'><img width="+helpW +" height="+ heightImg+" src='"+ imagePath+ "/Help_btn.png' /></div>";
        }
        else
        {
             str = str+"<div class='rightToolTxt'><a href=\"help.html\" target='_blank'><img width=" + helpW + " height=" + heightImg + "  border='0px' alt='Go to Help Page' title='Go to Help Page' onmouseover=\"this.src='"+ imagePath+ "/Help_btn_over.png';\" onmouseout=\"this.src='"+ imagePath+ "/Help_btn.png';\" name='Help_btn'   src='"+ imagePath+ "/Help_btn.png' /></a></div>";
        }
         str = str+"<div class='rightMenuTxt'>";
      
        if (drFeatues[17] == "N")
        {
             str = str+"&nbsp;</div>"; }
        else
        {  str = str+"<a class='topbar'  href=\"javascript:auf('comments_dialog');\" title='Comments'  >Comment</a></div>"; }

         str = str+"</div>";

        //************************************************************************************************************************************
        if (drFeatues[16] == "N")
        {
             str = str+"<div class='rightLogo'><img src='"+ imagePath+ "/Qmag-Logo.jpg' /></div>";

        }
        else
        {
             str = str+"<div class='rightLogo'><a href=\"javascript:openReSizableWindow('" + hRightLogoLink + "','Link');\"><img border='0'  src='"+ imagePath+ "/Qmag-Logo.jpg' /></a></div>";

        }
         str = str+"<div class='Patch'></div>";       
         str = str+"</div><div class='floatNone'></div>";
        document.getElementById("toolBarDiv").innerHTML = str;
 
 
 if ((drFeatues[3] == "N"))
{
    document.getElementById("ToolBar_ImgGoTo").src = imagePath + "/Go.jpg";
    document.getElementById("ToolBar_TxtGoToPage").className = "goToPage" + valResolution;
    document.getElementById("ToolBar_ImgGoTo").className = "goImg" + valResolution;
}
else
{
    document.getElementById("ToolBar_ddPages").className = "dropDownPage";
}
 return false;
 }  

