function setOpacity(domId, val) {
	obj = document.getElementById(domId);
	obj.style.MozOpacity = val;
	obj.style.opacity = val/10;
	obj.style.filter = 'alpha(opacity=' + val*10 + ')';
};
function hide(domId)
{ obj = document.getElementById(domId); //Get the Element
  obj.style.display = 'none';
  appear(domId);
//  fade('answer');
}
function fade(domId){
	 obj = document.getElementById(domId); //Get the Element
	if(obj.style.display == "none") return false; //Return false if the element is already hidden
	var alpha = 10; //Set the initial value of alpha to 10 (Opaque)
	function f(){ //Internal function
		alpha--; //Decrememnt the alpha value
		setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
		if(alpha > -1){ //If alpha is still bigger than -1 then..
			setTimeout(f, 100); //..then call the function again after 100 milliseconds
		}else{ //otherwise..
			obj.style.display = 'none'; //..otherwise now that we cant see the element anyways, hide it
		}
	}
	setTimeout(f, 100); //This is where we call the f() function for the first time
};

function appear(domId){
	obj = document.getElementById(domId); //Get the element
	if(obj.style.display != "none") return false; //Return if it is already being displayed
	obj.style.display = ''; //Un-hide the object before its animation
	var alpha = 0; //Set the initial value of alpha to 0 (invisible)
	function a(){ //Internal function
		alpha++; //Increment alpha
		setOpacity(domId, alpha); //Set the opacity of our element to the specified alpha
		if(alpha < 11)setTimeout(a, 70);
		/*Till alpha is 10, keep calling the
		a() function after 100 milliseconds */
	}
	setTimeout(a, 100); //This is where we call the a() function for the first time
};

prevColor =0;

var backColor = new Array(); // don't change this

// Enter the colors you wish to use. Follow the
// pattern to use more colors. The number in the
// brackets [] is the number you will use in the
// function call to pick each color.

backColor[0] = '#FFFFFF';  //white
backColor[1] = '#C0C0C0';  //lightgrey
backColor[2] = '#808080';  //grey
backColor[3] = '#66CC99';  //bluish
backColor[4] = '#339999';  //bluish
backColor[5] = '#FFFF66';  //yellowish
backColor[6] = '#FFCC00';  //gold
// Do not edit below this line.
//-----------------------------

function changeBG(a)
{newColor=prevColor+1;
 if(newColor>6)newColor=0;
 newColor=a;
document.bgColor = backColor[newColor];
prevColor=newColor;
}

function mouseOn(a_id)
{ changeBG(1); appear("answer");
document.getElementById(a_id).style.color="white";
document.getElementById(a_id).style.textDecoration="bold";
document.getElementById(a_id).style.borderStyle="inset";

}
function mouseOut(a_id)
{ changeBG(0);
document.getElementById(a_id).style.color="black";
document.getElementById(a_id).style.textDecoration="none";
document.getElementById(a_id).style.borderStyle="outset";
}
   function show(sw,id)
{
	if (document.getElementById)
	{
		x = document.getElementById(id);
    if (sw)  x.style.visibility = 'visible';
	if (!sw) x.style.visibility = 'hidden';


	}
	else if (document.all)
	{
	x = document.all[id];
    if (sw)  x.style.visibility = 'visible';
	if (!sw) x.style.visibility = 'hidden';
	}
	else if (document.layers)
	{
		x = document.layers[id];
    if (sw)  x.visibility = 'visible';
	if (!sw) x.visibility = 'hidden';
	}
}

function changeImage(pMsg,pSrc)
{
 document.images['big'].src=pSrc;
 changeContent('biginfo',pMsg+'<br>');
 show(false,'thephotos');show(true,'big');
}

function changeContent(id,newContent)
{
 	if (document.getElementById)
	{
    var f1 = document.getElementById(id);
    if( f1 != null )
    f1.innerHTML = newContent;
	}
	else if (document.all)
	{
	var f1 = document.all[id];
    if( f1 != null )
    f1.innerHTML = newContent;
	}
	else if (document.layers)
	{
	 var f1 = document.layers[id];
     if( f1 != null )
    f1.innerHTML = newContent;
	}
}
 function newPage(thehref)
{
 window.open(thehref);
}
function activePage(thehref)
{
parent.document.getElementById('xxx').src=thehref;
parent.document.getElementById('answer1').style.height='800px';
parent.document.getElementById('xxx').style.bgcolor='#CCCCCC';   
}