function switchicon(className, filtertag){
	switchcontent.call(this, className, filtertag) //inherit primary properties from switchcontent class
}

switchicon.prototype=new switchcontent //inherit methods from switchcontent class
switchicon.prototype.constructor=switchicon

switchicon.prototype.setStatus=null
switchicon.prototype.setColor=null

switchicon.prototype.setHeader=function(openHTML, closeHTML){ //PUBLIC
	this.openHTML=openHTML
	this.closeHTML=closeHTML
}

//PRIVATE: Contracts a content based on its corresponding header entered

switchicon.prototype.contractcontent=function(header){
	var innercontent=document.getElementById(header.id.replace("-title", "")) //Reference content for this header
	innercontent.style.display="none"
	header.innerHTML=this.closeHTML
	header=null
}


//PRIVATE: Expands a content based on its corresponding header entered

switchicon.prototype.expandcontent=function(header){
	var innercontent=document.getElementById(header.id.replace("-title", ""))
	innercontent.style.display="block"
	header.innerHTML=this.openHTML
	header=null
	
}

switchicon.prototype.expandcontent1=function(header, index){
	var innercontent=document.getElementById(header.id.replace("-title", ""))
	innercontent.style.display="block"
	header.innerHTML=this.openHTML
	header=null
      
	//alert(index)
        //alert(document.forms[0].maxId.value)
        
        if (index > document.forms[0].maxId.value)
        {
        	alert("All images opened")
        }
        else
        {   
            mosaicImage = eval("document.forms[0].mosaic" + index +".value")
            imgHTMLString = '<img id="08img' + index +'" src="'+ mosaicImage +'.jpg" usemap="#08map'+index+'" width="988" height="988">';
            //imgHTMLString = '<img id="08imga' + index +'" src="'+ mosaicImage +'a.jpg" usemap="#08map'+index+'a" width="988" height="380">';
            //imgHTMLString = imgHTMLString + '<img id="08imgb' + index +'" src="'+ mosaicImage +'b.jpg" usemap="#08map'+index+'b" width="988" height="380">';
            //imgHTMLString = imgHTMLString + '<img id="08imgc' + index +'" src="'+ mosaicImage +'c.jpg" usemap="#08map'+index+'c" width="988" height="228">';
            //alert(imgHTMLString);
        }

	// This has to be rendered at server side
	/*if (index == 1)
	{ 
	  imgHTMLString = '<img id="08img1" src="/vmosaic/mosaic1.png" usemap="#08map1">';
	  //imgHTMLString = '<img id="08img1" src="http://img443.imageshack.us/img443/5664/testimg1dx4.jpg" usemap="#08map1">';
	}else if (index == 2)
	{
	  imgHTMLString = '<img id="08img2" src="http://img207.imageshack.us/img207/4879/testimg2qb3.jpg" usemap="#08map2">'; 
	}else if (index == 3)
	{ 
	  imgHTMLString = '<img id="08img3" src="http://img296.imageshack.us/img296/7445/testimg3hx1.jpg" usemap="#08map3">';
	}*/
        innercontent.innerHTML = imgHTMLString
	//innercontent.innerHTML = innercontent.innerHTML + imgHTMLString
	count++
	//document.getElementById("oeight1-title").focus()
}
