﻿// JScript File

function printDoc()
{
    window.print();
}

function email(obj)
{
   ebc(true); 

   var cLeft = getposOffset(document.getElementById('lnkEmail'),"left");
   var cTop = getposOffset(document.getElementById('lnkEmail'),"top");
   
   document.getElementById('dvSend').style.left = (cLeft - 115) + "px";
   document.getElementById('dvSend').style.top = (cTop + 17 ) + "px";
   document.getElementById('dvSend').style.display = "block";
}

function eclose()
{
   ebc(false); 
   document.getElementById('dvSend').style.display = "none";
}
function ebc(mode)
{
    if(document.getElementById("F1") != null)
    {
        if(mode) document.getElementById("F1").style.position = 'static';
        else document.getElementById("F1").style.position = 'relative';
    }
}
function getposOffset(what, offsettype)
{
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
    var parentEl=what.offsetParent;
    while (parentEl!=null)
    {
        totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
        parentEl=parentEl.offsetParent;
    }
    return totaloffset;
}
function back()
{
    history.back(-1);
}

/* LAnguage Match */
function Arabic(id)
    {
        var LangId=id;
        if(document.getElementById('ctl00_hidLangurl') != null)
         {
           var Urls= document.getElementById('ctl00_hidLangurl').value;
           if(Urls.length  > 0)
           {
              var strUrls=Urls.split(LangId);
             if(strUrls.length > 1)
             {
                var path=strUrls[1].split('^');  
                var newPath=path[1].substring(0,path[1].length-1);
      
                newPath=newPath.split(';');
                if(newPath.length > 0)
                {
                 newPath=newPath[0];
                }
                else
                {
                 newPath=newPath;
                }
                location.href=newPath;
             }
             else
             {
              location.href=apath+"ar/";
             }
           }
           else
           {
            location.href=apath+"ar/";
           }
         }
        else
         {
            location.href=apath+"ar/";
         }
    }
/* LAnguage Match End */
