﻿// JScript File

function openwindow(strPath,strWidth,strHeight)
{
  var isInstalled = false;
  var version = null;
  if (window.ActiveXObject) {
    var control = null;
    try {
        // AcroPDF.PDF is used by version 7 and later
        control = new ActiveXObject('AcroPDF.PDF');
    } catch (e) {
        // Do nothing
    }
    if (!control) {
        try {
            // PDF.PdfCtrl is used by version 6 and earlier
            control = new ActiveXObject('PDF.PdfCtrl');
        } catch (e) {
            //return;
        }
    }
    if(control == null)
    {
      document.getElementById("pdflabel").innerHTML = "<div id='pdfdiv' style='position: absolute; height: "+strHeight+"; width: "+strWidth+"; top: 2%; left: 2%;border: 1px solid #1b5e88; background-color: #e9f0f6; color: #333;'><div style='height:20px; width: "+strWidth+";text-align:right; font-size:13px;padding:3 20 3 0;'><a href='javascript:ClosePdfDiv();'>Close</a></div></br></br></br></br></div>";
      return;
    }
  } else {
    // Check navigator.plugins for "Adobe Acrobat" or "Adobe PDF Plug-in"*
  }



  if (window.navigator.userAgent.indexOf("MSIE")>=1)
  {
    document.getElementById("pdflabel").innerHTML = "<div id='pdfdiv' style='position: absolute; height: "+strHeight+"; width: "+strWidth+"; top: 2%; left: 2%;border: 1px solid #1b5e88; background-color: #e9f0f6; color: #333;'><div style='height:20px; width: "+strWidth+";text-align:right; font-size:13px;padding:3 20 3 0;'><a href='javascript:ClosePdfDiv();'>Close</a></div><object classid='clsid:CA8A9780-280D-11CF-A24D-444553540000' width='"+strWidth+"' height='"+strHeight+"' border='0'><param name='SRC' value='"+strPath+"'><EMBED SRC='"+strPath+"' HEIGHT="+strHeight+" WIDTH="+strWidth+"> <NOEMBED> Your browser does not support embedded PDF files. </NOEMBED> </EMBED></object></div>";
  }
  else
  {
    window.open(''+strPath+'','','width='+strWidth+',height='+strWidth+',toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes,location=no, status=yes,top=10,left=10');   
  }

}

function ClosePdfDiv()
{
  document.getElementById("pdfdiv").style.display = "none";
}


    
function SkinIPonload()
{    
    sUrl = location.href;
    sIndexLogin = sUrl.indexOf("Login");
    sIndexSend = sUrl.indexOf("SendPassword");
    if( sIndexLogin != -1)
    {
      document.getElementById("foottr").style.display = "block";
      document.getElementById("NoTitle").style.display = "block";
      document.getElementById("NoTitle").innerHTML = "Login to Qdos Technology";
    }
    if(sIndexSend !=-1)
    {
      document.getElementById("foottr").style.display = "block";
      document.getElementById("NoTitle").style.display = "block";
      document.getElementById("NoTitle").innerHTML = "Forgot Password";
    }

}


function SkinHPonload()
{    
    
    sUrl = location.href;
    sIndexLogin = sUrl.indexOf("Login");
    sIndexSend = sUrl.indexOf("SendPassword");
    if( sIndexLogin != -1 || sIndexSend !=-1)
    {
      document.getElementById("foottr").style.display = "block";
      document.getElementById("divCarFlash").style.display = "none";
    }

    if(document.getElementById("hiddenSession") != null)
    {
      if(document.getElementById("hiddenSession").value != "1")
      {
        document.getElementById("divCarFlash").style.display = "none";
      }
    }
}

function changesrc(obj,objsrc)
{
      obj.src = objsrc;
}
