var currentMenu = "";
var dropDownArray = new Array ("how","send","buy","help");
// Check browser
var ddArrayLength = 4;


function doPreload()
{

   var the_images = new Array('image/t.gif','image/ywtitle.gif','image/ink-quill-250h -stockxpertcom_id16089671_size0.png','image/book-200w-tockxpertcom_id20349701_size0.png');
   preloadImages(the_images);
}

function preloadImages(the_images_array) {
   for(var loop = 0; loop < the_images_array.length; loop++)
   {
 	var an_image = new Image();
	an_image.src = the_images_array[loop];
   }
}

/*
 function toggle(id){
	for(count=0;count<ddArrayLength;count++)
	{
		theMenu = document.all(dropDownArray[count]);
//		alert(theMenu.id);
		if (theMenu.id == id)
		{
  		if (theMenu.style.display == '')
		{
	   	 	theMenu.style.display = 'none';
	  	}
		else
			{
	   	 	theMenu.style.display = '';
		currentMenu = id; 
			}
		}
	}
   checkMouse();
  return false;
 }
 */
function toggle(id)
{
    if(document.all[id].style.display == 'none')
	{
		document.all[id].style.display = '';
		currentMenu = id; 
    } 
	else 
	{
       document.all[id].style.display = 'none';
    }
	checkMouse();
	return false;
}

function makevisible(cur,which){
strength=(which==0)? 1 : 0.5

if (cur.style.MozOpacity)
cur.style.MozOpacity=strength
else if (cur.filters)
cur.filters.alpha.opacity=strength*100
}

function checkMouse() 
{
	for(count=0;count<ddArrayLength;count++)
	{
		theMenu = document.all(dropDownArray[count]);
		if (currentMenu != dropDownArray[count])
		{
	  		if (theMenu.style.display == '')
			{
		   	 	theMenu.style.display = 'none';
		  	}
		}
	}
}

function hideMenus() 
{
	for(count=0;count<ddArrayLength;count++)
	{
		theMenu = document.all(dropDownArray[count]);
  		if (theMenu.style.display == '')
		{
	   	 	theMenu.style.display = 'none';
	  	}
	}
}
