function expand(id) {
	if ((document.getElementById(id).style.display == "none") && (document.getElementById(id+"_ex").style.display == "")) {
		document.getElementById(id).style.display = "";
		document.getElementById(id+"_ex").style.display = "none";
	} else {
		document.getElementById(id).style.display = "none";
		document.getElementById(id+"_ex").style.display = "";
	}
}

function expandMenu(id) {
	if (document.getElementById(id).style.display == "none") {
		document.getElementById(id).style.display = "";
		document.getElementById(id+"_img").src = "/images/lm_arrow2.gif";
	} else {
		document.getElementById(id).style.display = "none";
		document.getElementById(id+"_img").src = "/images/lm_arrow1.gif";
	}
}

function MM_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=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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function goUrl(url)
{
	window.open(url, '', "title=no, menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=no, width=780, height=560");	
}

function winop(str){
	window.open(str, "win", "width=710,height=410,menubar=no")
}

function winOpScreenshot(str){
	window.open(str, "win", "width=710,height=410,menubar=no")
}

function randomBanner(){
	var elements = 8; 
	var arr = new Array(elements);
	arr[0] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_00.swf'><param name='quality' value='high'><embed src='flashAd_01.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[1] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_01.swf'><param name='quality' value='high'><embed src='flashAd_02.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[2] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_02.swf'><param name='quality' value='high'><embed src='flashAd_03.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[3] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_03.swf'><param name='quality' value='high'><embed src='flashAd_04.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[4] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_04.swf'><param name='quality' value='high'><embed src='flashAd_04.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[5] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_00.swf'><param name='quality' value='high'><embed src='flashAd_01.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[6] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_00.swf'><param name='quality' value='high'><embed src='flashAd_01.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	arr[7] = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='570' height='223' hspace='3' vspace='4'><param name='movie' value='flashAd_00.swf'><param name='quality' value='high'><embed src='flashAd_01.swf' width='570' height='223' hspace='3' vspace='4' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>";
	var result = 0;
	  if (Math.random){
		  result =  Math.round(Math.random() * (elements -1 ));
	  }else {
		  var now = new Date();
		  result  = (now.getTime() / 1000) % elements;
	  }
	  document.write(arr[result]);
}

function rePlace(){
	document.getElementById('best').style.left = Math.ceil(( document.body.clientWidth - 790 ) / 2) + 184;
	document.getElementById('best2').style.left = Math.ceil(( document.body.clientWidth - 790 ) / 2) + 184;
}