var browser = true;

if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion, 10) >= 4)) {
    browser = true;
  } else {
    browser = false;
  }


function pcurs(elm){
  var elm;
 if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
    document.all(elm).style.cursor="hand";
    document.all(elm).style.textDecoration='underline';
    document.all(elm).style.color='#FFFFFF';
 } else {
    document.getElementById(elm).style.cursor="pointer";
    document.getElementById(elm).style.textDecoration='underline';
    document.getElementById(elm).style.color='#FFFFFF';
 }
}

function preloadImages() { //v3.0
  var d=document;
  if(d.images){ 
    if(!d.MM_p)
      d.MM_p=new Array();
    var i,j=d.MM_p.length,a=preloadImages.arguments;
    for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){
        d.MM_p[j]=new Image;
	d.MM_p[j++].src=a[i];
      }
  }
}

function swapImage(id, newImg)
{
  var elm, i;
  if (browser){
    elm = document.all(id);
  } else {
   elm = document.getElementById(id);
  }
  if (!elm || !document.MM_p || (document.MM_p.length == 0)) {return;}
  elm.rem_src = elm.src;
  elm.src = newImg;
}

function restoreImage(id)
{
  var elm, i;
  if (browser){
    elm = document.all(id);
  } else {
   elm = document.getElementById(id);
  }
  if (!elm || !elm.rem_src) {return;}
  elm.src = elm.rem_src;
}

function createCurrencyWindow(price)
{
  window.open('/currency_convert'+price+'.html', 'currncy_convert', 'width=360,height=400, scrollbars=no');
  status="Show game's price converted into different currencies.";
}
