function addBookmark(){
var url = document.location.href;
var name = document.title;
    if(window.sidebar && window.sidebar.addPanel) {
        window.sidebar.addPanel(name,url,'');
} else if(window.opera && window.print) { 
        var e=document.createElement('a');
        e.setAttribute('href',url);
        e.setAttribute('title',name);
        e.setAttribute('rel','sidebar');
        e.click();
} else if(window.external) {
        try {
            window.external.AddFavorite(url,name);
        }
        catch(e){}
}
else
        alert("To add our website to your bookmarks use CTRL+D on Windows and Linux and Command+D on the Mac.");
}

function Translate()
{
document.getElementById("TranslatePopup").style.display = "block";
document.getElementById("TranslatePopup").style.right = '27px';
document.getElementById("TranslatePopup").style.top = '32px';
setTimeout("TranslateHide()",3000);
}

function Languages()
{
document.getElementById("TranslatePopup").style.right = '27px';
document.getElementById("TranslatePopup").style.top = '175px';
document.getElementById("TranslatePopup").style.display = "block";
setTimeout("TranslateHide()",3000);
}

function TranslateHide()
{
document.getElementById("TranslatePopup").style.display = "none";
}

function PageOptions()
{
document.getElementById("PageOptionsPopup").style.display = "block";
setTimeout("PageOptionsHide()",3000);
}

function PageOptionsHide()
{
document.getElementById("PageOptionsPopup").style.display = "none";
}

function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('divTime').innerHTML=h+":"+m+":"+s;
t=setTimeout('startTime()',500);
}

function checkTime(i)
{
if (i<10)
  {
  i="0" + i;
  }
return i;
}

function onloadselect1(val)
{
document.getElementById('TopBuy').style.backgroundImage = "";	
document.getElementById('TopSell').style.backgroundImage = "";	
document.getElementById('TopBiz').style.backgroundImage = "";	

document.getElementById(val).style.backgroundImage = "url(/images/tradeoffer/selection-bg-medium.gif)";	
document.getElementById(val).style.backgroundRepeat = "no-repeat";
onloadShowBox1(val);
}


function select1(val)
{
document.getElementById('TopBuy').style.backgroundImage = "";	
document.getElementById('TopSell').style.backgroundImage = "";	
document.getElementById('TopBiz').style.backgroundImage = "";	

document.getElementById(val).style.backgroundImage = "url(/images/tradeoffer/selection-bg-medium.gif)";	
document.getElementById(val).style.backgroundRepeat = "no-repeat";
ShowBox1(val);
}

function select2(val)
{
document.getElementById('Auction').style.backgroundImage = "";	
document.getElementById('Directory').style.backgroundImage = "";	
document.getElementById('Exhibition').style.backgroundImage = "";	
document.getElementById('Showroom').style.backgroundImage = "";	

document.getElementById(val).style.backgroundImage = "url(/images/tradeoffer/selection-bg-small.gif)";	
document.getElementById(val).style.backgroundRepeat = "no-repeat";
ShowBox2(val);
}


var xmlHttp

function onloadShowBox1(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="box1.asp";
url=url+"?t="+str;
xmlHttp.onreadystatechange=onloadBox1Changed;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function onloadBox1Changed() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("BoxContent").innerHTML=xmlHttp.responseText;
	select2('Auction');
	}
}

function ShowBox1(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="box1.asp";
url=url+"?t="+str;
xmlHttp.onreadystatechange=Box1Changed;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function Box1Changed() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("BoxContent").innerHTML=xmlHttp.responseText;
	}
}

function ShowBox2(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="box2.asp";
url=url+"?t="+str;
xmlHttp.onreadystatechange=Box2Changed;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function Box2Changed() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("Box2Content").innerHTML=xmlHttp.responseText;
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

