﻿// JScript File

function printDoc()
{
window.print();
}
function Back()
{
 history.back(-1);
}
function BLOver(obj)
{
 //alert('in');
    obj.className = 'bgmenusel';
}

function BLOut(obj)
{
    obj.className = 'bgmenu';
}

function BLOverSelected(obj)
{
    obj.className = 'bgmenusel';
}
function email(obj)
{

   ebc(true); 
   var cLeft = getposOffset(document.getElementById('lnkEmail'),"left");
   var cTop = getposOffset(document.getElementById('lnkEmail'),"top");

   document.getElementById(hidUrl).value=location.href;
   
   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;
}

/* LAnguage Match */
var apath="/"
function English(id)
{
       var Urls = location.href;
       if(Urls.length > 0)
       {
            var fixpath = Urls.split("/ar/ar-ae/");
            if(fixpath.length > 1)
            {
                location.href = apath+"en/en-us/"+fixpath[fixpath.length-1];
            }
            else
            {
                var fixpath = Urls.split("/ar/");
                if(fixpath.length > 1)
                {
                    location.href = apath+"en/"+fixpath[fixpath.length-1];
                }
            }
       }
       else
       {
        location.href = apath+"en/";
       }
    }
    
/* LAnguage Match End */