function go()
{
window.location = '/intl/Content/Search.aspx?key=' + document.getElementById('_ctl0_Header_keysearch').value;
}
function showhelp(text)
{
var helppanel = document.getElementById("helppanel").innerText=text;
}
function setstatus(text){
window.status=text;
}
function onEditKeyDown( a, e)
{
  if( e.keyCode == 123) 
//  if( window.event.shiftKey && window.event.altKey)
    {
    iType = ( iType == LANGUAGE_LATIN) ? LANGUAGE_FARSI : LANGUAGE_LATIN;
    if (document.all.lang)
    {document.all.lang.value=Button[iType];}
    if(objSet)
    {
    objSet.focus();
    if (iType==LANGUAGE_LATIN)
      {objSet.dir='ltr';}
    else
      {objSet.dir='rtl';}
    }
//    change();
//    alert(a.value);
//    alert(iType);
//    alert(e.keyCode);    
    }
  return;
}

function changetoe()
{
    iType = LANGUAGE_LATIN;
    if (document.all.lang)
    {document.all.lang.value=Button[iType];}
    if(objSet)
    {
    objSet.focus();
    if (iType==LANGUAGE_LATIN)
      {objSet.dir='ltr';}
    else
      {objSet.dir='rtl';}
    }
//    change();
//    alert(a.value);
//    alert(iType);
//    alert(e.keyCode);    

  return;
}

function change()
{
    iType = ( iType == LANGUAGE_LATIN) ? LANGUAGE_FARSI : LANGUAGE_LATIN;
    
//    alert(iType);
//    alert(objSet.value);
    if (document.all.lang)
    {document.all.lang.value=Button[iType];}
    if(objSet)
    {
    objSet.focus();
    if (iType==LANGUAGE_LATIN)
      {objSet.dir='ltr';}
    else
      {objSet.dir='rtl';}
    }
}

function onEditKeyPress( a, e)
{
  e = window.event;
  var iResult = e.keyCode;
//  alert(e.keyCode);//
  var CurKey = IndexOf( iResult);
  //alert(CurKey);
  if( CurKey != -1)
    iResult = ( iType == LANGUAGE_FARSI) ? FarsiMap[ CurKey] : LatinMap[ CurKey];
  e.keyCode = iResult;
  return;
}
function onEditKeyPresse( a, e)
{
  e = window.event;
  var iResult = e.keyCode;
//  alert(e.keyCode);//
  var CurKey = IndexOf( iResult);
//  alert(CurKey);//
  if( CurKey != -1)
    iResult = ( iType == LANGUAGE_FARSI) ? FarsiMap[ CurKey] : LatinMap[ CurKey];
    e.keyCode = iResult;
  return;
}

