   var dicDialog = null;

   function load () {
      window.isReady = true;
      dicDialog = new DicDialog ();
      dicDialog.load ();
   }

function bookmarkus()
{
  if( navigator.appName.indexOf("Microsoft") >= 0 )
  {
    window.external.AddFavorite( "http://dictionary.paralink.com", "Free Dictionary Online" );
  }
  else
  {
    wndbookmark=window.open("bookmark.asp","bookmark","left=50,top=20,width=352,height=400,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");
  }
}

function doReverse(){
TEMPID = document.form.langs.value.split("/");
NEWID = TEMPID[1] + "/" + TEMPID[0];
/*
TEMPTEXT = document.form.langs.options[document.form.langs.selectedIndex].text.split(" to ");
NEWTEXT = TEMPTEXT[1] + " to " + TEMPTEXT[0];
*/
  for (var i = 0; i < document.form.langs.length; ++i) {
    if(document.form.langs.options[i].value == NEWID) {
        document.form.langs.selectedIndex = i;
    }	
  }
setCookie("langs", NEWID);
Lable();
}

function setCookie(name, value, expires, path, domain, secure)
{
 if(!expires){
	var d=new Date();
	d.setFullYear(2020);
	expires = d;
 }

    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}



function Lable(){
 document.getElementById("lable").innerHTML = document.form.langs.options[document.form.langs.selectedIndex].text + " Dictionary";
 if(document.form.langs.value.indexOf('ru') >= 0 ){
	 document.getElementById('enrudics').style.visibility='visible';
         document.form.dicID.value=document.form.mydicID.value;
 }else{
	 document.getElementById('enrudics').style.visibility='hidden';
         document.form.dicID.value="";
 }
 setCookie('dicID', document.form.dicID.value);
}


function ChangeMenu(){
 Lable(); 
 setCookie('langs', document.form.langs.value);
}


function BanLoad(b1,b2,b3){
	if(b1==1) document.getElementById('ifr300x250').contentWindow.location.reload();
	if(b2==1) document.getElementById('ifr300x250-2').contentWindow.location.reload();
	if(b3==1) document.getElementById('ifr728x90').contentWindow.location.reload();
}