﻿function setFrame(id) 
{
    
    var mydiv = document.getElementById('mycardDiv');
        if (id == 0) 
        {
          
            ti.style.display = '';
            tt.style.display = 'none';
            th.style.display = 'none';
            
        }
        else if (id == 1) 
        {           
            ti.style.display = 'none';
            tt.style.display = '';
            th.style.display = 'none';
        }
        else if (id == 2) 
        {       
            ti.style.display = 'none';
            tt.style.display = 'none';
            th.style.display = '';
        }

        for (i = 0; i < cardRbns.length; i++)
            document.getElementById(cardRbns[i]).checked = false;

        tedadCmb.selectedIndex = 0;        

}
/*********************************************/
function pageWidth() { return window.innerWidth != null ? window.innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null; }
/*********************************************/
function pageHeight() { return window.innerHeight != null ? window.innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body != null ? document.body.clientHeight : null; }
/*********************************************/
function posLeft() { return typeof window.pageXOffset != 'undefined' ? window.pageXOffset : document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ? document.body.scrollLeft : 0; } function posTop() { return typeof window.pageYOffset != 'undefined' ? window.pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ? document.body.scrollTop : 0; } function posRight() { return posLeft() + pageWidth(); } function posBottom() { return posTop() + pageHeight(); }
/*********************************************/
function showwait() 
{
    trback = document.getElementById('poptransback');
    trback.style.display = 'block';
    trback.style.width = pageWidth();
    trback.style.height = pageHeight();
    trback.style.left = posLeft();
    trback.style.top = posTop();
    document.getElementById('popback').style.display = 'block';
    setTimeout('document.images["waitimg"].src = "image/wait.gif"', 200);
}
/*********************************************/
function hesab(cardId) 
{     
    var mablagh = cardValues[cardId]; 
}
/*********************************************/
function CurentCost()
{
    for (i = 0; i < cardCost.length; i++)
    {
        document.getElementById(cardCost[i]).innerHTML = cardValues[i];
    }
}
/*********************************************/
function setMain()
{
    document.getElementById('main').style.width = '580px';    
}
/*********************************************/
function PayButttonHover(button, buttonHover, hover)
{
    if (hover == 1) //mouse is coming
    {
        document.getElementById(button).style.display = 'none';
        document.getElementById(buttonHover).style.display = 'inline'
    }
    else if (hover == 0) //mouse going out
    {
        document.getElementById(button).style.display = 'inline';
        document.getElementById(buttonHover).style.display = 'none'
    }

    var esm = navigator.appVersion;
    

}
/*********************************************/
function showSelectedBankName()
{

    if (bankNames[sbhf.value] == undefined)
        document.getElementById('bankname').innerHTML = '';
    else
        document.getElementById('bankname').innerHTML = bankNames[sbhf.value];
  
}
