////////////////////////////////// New Menu JS
function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child );

  var top  = (c["at_position"] == "y") ? p.offsetHeight+2 : 0;
  var left = (c["at_position"] == "x") ? p.offsetWidth +2 : 0;

  for (; p; p = p.offsetParent)
  {
    top  += p.offsetTop;
    left += p.offsetLeft;
  }

  c.style.position   = "absolute";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
  c.style.visibility = "visible";
}

// ***** runURL *****
function runURL(URL){
	window.location.href=URL
}

// ***** at_show *****

function at_show()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);
 clearTimeout(c["at_timeout"]);
}

// ***** at_hide *****

function at_hide()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 50);
}

function at_shide()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

}

// ***** at_click *****

function at_click()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  if (c.style.visibility != "visible") at_show_aux(p.id, c.id); else c.style.visibility = "hidden";
  return false;
}

// ***** at_attach *****

// PARAMETERS:
// parent   - id of the parent html element
// child    - id of the child  html element that should be droped down
// showtype - "click" = drop down child html element on mouse click
//            "hover" = drop down child html element on mouse over
// position - "x" = display the child html element to the right
//            "y" = display the child html element below
// cursor   - omit to use default cursor or specify CSS cursor name

function at_attach(parent, child, showtype, position, cursor)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p["at_parent"]     = p.id;
  c["at_parent"]     = p.id;
  p["at_child"]      = c.id;
  c["at_child"]      = c.id;
  p["at_position"]   = position;
  c["at_position"]   = position;

  c.style.position   = "absolute";
  c.style.visibility = "hidden";

  if (cursor != undefined) p.style.cursor = cursor;

  switch (showtype)
  {
    case "click":
      p.onclick     = at_click;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
	  	  
    case "hover":
      p.onmouseover = at_show;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
	  
	 case "searchclick":
      p.onclick     = at_show;
      p.onmouseout  = at_shide;
      c.onmouseover = at_show;
      c.onmouseout  = at_shide;
      break;
  }
}
////////////////////Clear the input for search text bo

function clearText(thefield)
{
	if (thefield.defaultValue=="SEARCH" || thefield.defaultValue=="E-mail" || thefield.defaultValue=="Password")
	{
		thefield.value = ""
		thefield.defaultValue = ""
	}
	
	if ( thefield.name=="pwd1"){
	
		document.getElementById("textType").style.visibility = "hidden"
		document.getElementById("textType").style.display = "none"
		
		document.getElementById("pwdType").style.visibility = "visible"
		document.getElementById("pwdType").style.display = "block"
		
		document.frmLogin.pwd.focus()
	}
}
////////////////////end clear here

/////////////////////////  End Of New Menu


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_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_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];}
}
imgout=new Image(11,11);
imgin=new Image(11,11);
imgin.src="http://www.eurobasket.com/sysImg/collapse_all.gif";
imgout.src="http://www.eurobasket.com/sysImg/expand_all.gif";
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}
function shoh(id) { 
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			filter(("img"+id),'imgin');			
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}
function loadImg(continent){
	MM_preloadImages(
					continent+'/sysImg/continents/continentmenubuttons_r1_c1_f2.jpg',
					continent+'/sysImg/continents/continentmenubuttons_r3_c1_f2.jpg',
					continent+'/sysImg/continents/continentmenubuttons_r5_c1_f2.jpg',
					continent+'/sysImg/continents/continentmenubuttons_r7_c1_f2.jpg',
					continent+'/sysImg/continents/continentmenubuttons_r9_c1_f2.jpg',
					continent+'/sysImg/continents/continentmenubuttons_r11_c1_f2.jpg',
					continent+'/sysImg/buttons/buttons_r1_c1_f2.jpg',
					continent+'/sysImg/buttons/buttons_r2_c1_f2.jpg'
					);
}

imgout=new Image(11,11);
imgin=new Image(11,11);
imgin.src="http://www.eurobasket.com/sysImg/collapse_all.gif";
imgout.src="http://www.eurobasket.com/sysImg/expand_all.gif";
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

function shoh(id) { 
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){		
			document.getElementById(id).style.display = 'block';
			
			filter(("img"+id),'imgin');			
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}

//Flash
var bo_ns_id = 0;function startIeFix(){if(isIE()){document.write('<noscript id="bo_ns_id_' + bo_ns_id + '">');}}function endIeFix(){if(isIE()){var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);var theNoScript = theObject.innerHTML;document.write(theNoScript);}}function isIE(){var strBrowser = navigator.userAgent.toLowerCase();if(strBrowser.indexOf("msie") > -1 && strBrowser.indexOf("mac") < 0){return true;}else{return false;}}
/* *************************************************************** */
