//******************************************************************
//****** image rollover ********************************************
//******************************************************************
function rollon(imageName)
{
	document[imageName].src = "../soa_images/"+imageName +"_on.gif";
}

function rolloff(imageName)
{
	document[imageName].src = "../soa_images/"+imageName +"_off.gif";
}

//******************************************************************
//****** Play Buttons **********************************************
//******************************************************************
function PlayOn(imageName)
{
	document[imageName].src = "../soa_images/icon_play_on.gif";
}

function PlayOff(imageName)
{
	document[imageName].src = "../soa_images/icon_play_off.gif";
}


//******************************************************************
//****** pop-up window *********************************************
//******************************************************************
function windowPrint(getpage)
{
	window.open(getpage,'print','toolbar=no,width=525,height=550,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no')
}
function windowExport(getpage)
{
	window.open(getpage,'export','toolbar=no,width=320,height=240,directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no')
}
function PopUp(getpage, wdth, hght)
{
	window.open(getpage,'PopUp','toolbar=no,width=' + wdth + ',height=' + hght + ',directories=no,status=no,scrollbars=yes,resizable=yes,menubar=no,top=35,left=35');
}
function PopUpFull(getpage, wdth, hght)
{
	window.open(getpage,'PopUpFull','toolbar=yes,width=' + wdth + ',height=' + hght + ',directories=yes,status=yes,scrollbars=yes,resizable=yes,menubar=yes,top=35,left=35');
}

//******************************************************************
//****** assign focus to a field ***********************************
//******************************************************************
function FieldFocus(i)
{
	document.form1.elements[i].focus();
}


//******************************************************************
//****** rate an item **********************************************
//******************************************************************
function addRating(getpage)
{
 window.open(getpage,'Rating','toolbar=no,width=10,height=10,directories=no,status=no,scrollbars=no,resizable=no,menubar=no');

}

//******************************************************************
//****** hide elements (thanks for voting text)  *******************
//******************************************************************
function display(element) {
    if (document.layers && document.layers[element] != null)
        document.layers[element].visibility = 'visible';
    else if (document.all)
        document.all[element].style.visibility = 'visible';
}
function hide(element) {
    if (document.layers && document.layers[element] != null)
        document.layers[element].visibility = 'hidden';
    else if (document.all)
        document.all[element].style.visibility = 'hidden';
}

//******************************************************************
//****** set backgroud image ***************************************
//******************************************************************
function setBgColor (id, color) {
  if (document.layers)
    document[id].bgColor = color == 'transparent' ? null : color;
  else if (document.all)
    document.all[id].style.backgroundColor = color;
  else if (document.getElementById)
    document.getElementById(id).style.backgroundColor = color;
}

function setBackgroundImage (id, imageURL) {
  if (document.layers)
    document[id].background.src = imageURL == 'none' ? null : imageURL;
  else if (document.all)
    document.all[id].style.backgroundImage = imageURL == 'none' ? 'none' 
: 'url(' + imageURL + ')';
  else if (document.getElementById)
    document.getElementById(id).style.backgroundImage = imageURL == 
'none' ? 'none' : 'url(' + imageURL + ')';
}
