var fsize; function zoomIn() {
    bcn = document.body.className; if (bcn == "body body0")
        document.body.className = "body body1"; else if (bcn == "body body1")
        document.body.className = "body body2"; else
        document.body.className = "body body3";
}
function zoomOut() {
    bcn = document.body.className; if (bcn == "body body3")
        document.body.className = "body body2"; else if (bcn == "body body2")
        document.body.className = "body body1"; else
        document.body.className = "body body0";
}
function ifEmpty(txtSearch) {
    var str = txtSearch.value; var x = trim(str); if (x == "")
    { } 
}
function ifsearch(txtSearch) { var str = txtSearch.value; var x = trim(str); if (x == "Searchhere") { txtSearch.value = ""; } }
function trim(str) { return str.replace(/ /g, ""); }
 
 function getHome() {
    if (document.location.href.toString().toLowerCase().indexOf("/arabic/") != -1) 
    { window.location.href='/arabic' }
    else { window.location.href='/english'} 
}

function isArabic()
 {
    if (document.location.href.toString().toLowerCase().indexOf("/arabic/") != -1) { return true; }
    else { return false; } 
}


function GetLangFromUrl() {
    if (document.location.href.toString().toLowerCase().indexOf("/arabic/") != -1) { return "ar-SA"; }
    else { return "en-US"; } 
}



function GetRss() {
    if (document.location.href.toString().toLowerCase().indexOf("/arabic/") != -1) 
    { window.open('http://www.sca.gov.ae/rss/arabic/news.aspx') }
    else { window.open('http://www.sca.gov.ae/rss/english/news.aspx')} 
} 



$(document).ready(function() {
   $('#vTicker').vTicker({
    speed: 500,
    pause: 3000,
    showItems: 1,
    animation: 'fade',
    mousePause: false,
    height: 0,
    direction: 'up'
});

});

function getEsmFrame()
{
if(isArabic())
	$("#esmFrame").attr('src','http://esm.sca.ae/arabic/empty/pages/default.aspx');
else
	$("#esmFrame").attr('src','http://esm.sca.ae/english/empty/pages/default.aspx');
}

