function MM_preloadImages() 
{
  var d=document;
  if(d.images)
  { 
    if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_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 Img(p,dp) {
  return eval("document.image"+p+".src='images/"+dp+"'");
}


function Res(s,ds) {
  return eval("document.image"+s+".src='images/"+ds+"'");
}

//============================================================================

function getLeftPos(Obj)
{
   var aaa = aObj.offsetLeft;
   while(aObj.offsetParent!=null)
   {
     aObj= aObj.offsetParent;

     aaa+=aObj.offsetLeft;
   }
   return aaa;
}

function getTopPos(Obj)
{
   var aaa = aObj.offsetTop;
   while(aObj.offsetParent!=null)
   {
     aObj= aObj.offsetParent;

     aaa+=aObj.offsetTop;
   }
   return aaa;
}


function showObject(dId, aId, topElement)
{
  aObj = document.getElementById(aId);
  dObj = document.getElementById(dId);
  dObj.style.visibility = "visible";
   
   dObj.style.position = "absolute";
   dObj.style.top = topElement;

   dObj.style.left =  getLeftPos(aObj);

  aObj = document.getElementById(aId);
  aObj.style.backgroundColor = "#FEF7DD";
  //if((aObj.className=="Menu02a") || (aObj.className=="Menu02")) aObj.className = "Menu02a";
  if(document.getElementById(dId).style.visibility == "visible") Img(2,'button02a.gif');
}

//============================================================================

function showObject2(dId, aId)
{
  aObj = document.getElementById(aId);
  dObj = document.getElementById(dId);
  mObj = document.getElementById('m1');
  dObj.style.visibility = "visible";
   
  dObj.style.position = "absolute";
  dObj.style.top = aObj.offsetTop-1;
  
  //dObj.style.left = mObj.offsetLeft-4;
    
  //if(screen.Width <= 800) dObj.style.left = getLeftPos(aObj);
  //if((screen.Width > 800) && (screen.Width <= 1024))
  if(screen.Width > 1024) if(aId=='link_06_01') dObj.style.left = getLeftPos(mObj);
}

//============================================================================

function hideObject(dId, aId)
{
  document.getElementById(dId).style.visibility = "hidden";
  aObj.style.backgroundColor = "#E6DDC4";
  //if((aObj.className=="Menu02") || (aObj.className=="Menu02a")) aObj.className = "Menu02";
  if(document.getElementById(dId).style.visibility == "hidden") Res(2,'button02.gif');
}

//============================================================================

function Screen() {
  var r=screen.Width;
  if (r<=800) document.write('<LINK href="style_800.css" rel=stylesheet>');
  if ((r>800) && (r<=1024)) document.write('<LINK href="style_1024.css" rel=stylesheet>');
  if (r>1024) document.write('<LINK href="style.css" rel=stylesheet>');
}

//============================================================================

function order()
{
document.getElementById('send').className = 'VisibleSend';
}

function button_hr(id, a, na) {
idd=id+"_hid";
eval ("if (document.all."+idd+".style.display=='none') { document.all."+idd+".style.display='block'; document.all."+id+".className='"+a+"';} else { document.all."+idd+".style.display='none'; document.all."+id+".className='"+na+"';}");
}

//============================================================================
function testfunc(m){
  name = new String("test");
  name=name+String(m);
  eval ("if (document.all."+name+".style.display=='none') { document.all."+name+".style.display='block'; } else { document.all."+name+".style.display='none';}");
}
function test(n) {
  name = new String("test");
  name=name+String(n);
  document.write('<a href="#" onclick="testfunc('+n+')" class="test">'+name+'</a>');
  document.write('<div id="'+name+'" style="display: none" onclick="testfunc('+n+')">');
  document.write('<table bgcolor="#FFFF00"><tr><td><img src="images/void.gif" alt="" width="1000" height="1000" border="1"></td></tr></table></div>');
}



