

if (navigator.appName == "Netscape") {
                        all = ""
								write= "document.write ("
								closedbracket =")"
                        }else{
                       all= "all."
							  write = "innerHTML ="
							  closedbracket =""
                }


var theDivs=new Array(6);
theDivs[0]="who"
theDivs[1]="what"
theDivs[2]="book"
theDivs[3]="dvd"
theDivs[4]="cd"
theDivs[5]="adopt"
theDivs[4]="mylist"
theDivs[5]="list"

function hideAll(id){
	for (i=0; i < 6; i++){
	if (id != i){
	document.getElementById(theDivs[i]).style.visibility = "hidden";}
}}

var Mtype=new Array(23);
for (i=0; i < 23; i++)
{
Mtype[i] = new Array(4);
} 

function showIt(id, id1, id2){
	document.getElementById(id1).style.visibility = "hidden";
	
	document.getElementById(id).style.visibility = "visible";
	if (id2 != 1){
	document.getElementById(id2).style.visibility = "hidden";}
}
function showOne(id){

	
	document.getElementById(id).style.visibility = "visible";

}
var shopWhere
var groupTitle
var genre
function setVar (whatgenre){
	genre=whatgenre
}
function getRadio(howMany,whichForm){


var oForm = document.forms[1]
for(i=0; i<oForm.elements.length;i++){
   type = oForm.elements[i].type;
   selected = oForm.elements[i].checked;
   if(type == "radio"){
       if(selected == true){
          shopWhere=document.forms[1].elements[i].value 
        }
    }
}

}

function fillForm(chosen,theTitle,whichForm){
	var y=0	
	var theValue
	var shopWhereLink
	 if ( whichForm == 1)
    {
	document.getElementById('mylist').style.visibility = "visible";
	
	groupTitle=theTitle

	eval('document.'+all+'writeHere.'+write+'"'+theTitle+'"'+closedbracket);
	
	}else{
	
	getRadio(5,whichForm);
	document.forms[whichForm].elements[0].value=shopWhere;
	shopWhereLink="<A target='_blank' HREF='http://www."+shopWhere+"'>"+shopWhere+"</A>"
	eval('document.'+all+'typeofWhat.'+write+'"'+theTitle+" "+genre+"s "+'"'+closedbracket);
	eval('document.'+all+'whatPlace.'+write+'"'+shopWhereLink+'"'+closedbracket);

	document.forms[whichForm].elements[9].value=theTitle;
	document.forms[whichForm].elements[10].value=genre;
	}
	
	for (x=0;x<4;x++){
		if ( whichForm == 1)
    		{		
			theValue=Mtype[chosen][x]
			y=2	
		}else{
			theValue=document.forms[1].elements[x+2].value
			y=y+1
			}
	theLength=theValue.length
	 if ( theLength > 20)
    {
		document.forms[whichForm].elements[x+y].size= theLength+7
	}
		document.forms[whichForm].elements[x+y].value=theValue;

	}

}





