var searchAreaStructure=new Object();
searchAreaStructure.initial=function(calledObj)
 {
this.calledObj=calledObj
this.helper=false;
this.footer=false;
this.adver=false;
this.netosearch=false;
this.phrasesPlace=false;
this.resultPlace=false;
this.phraseAreaInit();
this.iconobjects=[];
 }
searchAreaStructure.initial.prototype={
phraseAreaInit:function()
	{
var bodys = document.getElementById(this.calledObj.mySearchAreaName);
var tempDiv     = document.createElement("div");
tempDiv.setAttribute('id',"phraseArea");
tempDiv.setAttribute('width',"100%");
tempDiv.setAttribute('height',"50");
tempDiv.setAttribute('align',"right");
if(ie)
tempDiv.setAttribute('className',"phraseAreaClass");
else
tempDiv.setAttribute('class',"phraseAreaClass");
bodys.appendChild(tempDiv);
tempDiv=document.getElementById("phraseArea");
tempDiv.style.width="95%"
//tempDiv.innerHTML="4444444444444444444444"
this.calledObj.phraseArea=tempDiv
	},
enableFooter:function(ishelper)
	{
this.footer=true;
this.helper=ishelper;
var bodys = document.getElementById(this.calledObj.mySearchAreaName);
var tbl     = document.createElement("table");
var tblBody = document.createElement("tbody");


tbl.setAttribute('id',"footerContainer");
//if(ie)
	//tbl.setAttribute('className',"footerClass");
	//else
//tbl.setAttribute('class',"footerClass");
var tr=document.createElement("tr");
var tdsH=document.createElement("td");
var tdsI=document.createElement("td");
var tdsC=document.createElement("td");
if(ie)
		{
	tdsI.setAttribute('className',"footerClass");
	//tdsH.setAttribute('className',"footerClass");
	tdsC.setAttribute('className',"footerClass");
		}
	else
		{
//tdsH.setAttribute('class',"footerClass");
tdsI.setAttribute('class',"footerClass");
tdsC.setAttribute('class',"footerClass");
		}
tdsH.setAttribute('align',"left");
tdsH.setAttribute('width',"30%");
//tdsI.setAttribute('width',"30%");

tdsC.setAttribute('align',"left");
tdsC.setAttribute('width',"15px");
	
//var tdsI2=document.createElement("td");
//if(ie)
	//tbl.setAttribute('className',"myFooterClass");
	//else
//tbl.setAttribute('class',"myFooterClass");
var tempIconHObj;
var tempIconCObj;
tempIconCObj=new netoIconObject.initial("t",closeIcon,"","","","netoCloseFunct","X","",2)
var tempIconIObj=new netoIconObject.initial("i",netoIcon,"","","","netoClickFunct","Neto","",1)
this.iconobjects["i1"]=tempIconIObj
//tdsI.appendChild(tempIconIObj)	
tbl.appendChild(tblBody)
//bodys.insertBefore(tbl, netoSearch.phraseArea);
bodys.appendChild(tbl)
document.getElementById("footerContainer").style.backgroundColor=colors[curr_butt-1]
tblBody.appendChild(tr)
tr.appendChild(tdsI)
tr.appendChild(tdsH)
tr.appendChild(tdsC)
this.iconobjects["i1"]=tempIconIObj
this.iconobjects["i2"]=tempIconCObj
if(this.helper){

tempIconHObj=new netoIconObject.initial("t",helpIcon,"","","","helpClickFunct","?","",0)
this.iconobjects["i0"]=tempIconHObj
tdsH.appendChild(tempIconHObj.iconObj)
tempIconHObj.iconObj.appendChild(tempIconHObj.textual)
}
tdsC.appendChild(tempIconCObj.iconObj)
tempIconCObj.iconObj.appendChild(tempIconCObj.textual)


var cursortype="pointer"
if(ie)
cursortype="hand"
//tempIconIObj.iconObj.style.padding = "0 10 0 10"
tempIconIObj.iconObj.style.cursor=cursortype
//tempIconCObj.iconObj.style.padding = "0 10 0 10"
tempIconCObj.iconObj.style.cursor=cursortype
if(this.helper){
tempIconHObj.iconObj.style.cursor=cursortype
//}
}


tdsI.setAttribute('align',"right");
tbl.setAttribute('width',"100%");
tbl.setAttribute('class',"widgetTitle");
tdsI.appendChild(tempIconIObj.iconObj)	

this.calledObj.footerarea=tbl
	},
enableAdver:function()
	{
this.adver=true;
var bodys = document.getElementById(this.calledObj.mySearchAreaName);
var adverDiv     = document.createElement("div");
adverDiv.setAttribute('id',"adverArea");
adverDiv.setAttribute('width',"100%");
adverDiv.setAttribute('height',"50");
adverDiv.setAttribute('align',"right");
if(ie)
adverDiv.setAttribute('className',"adverAreaClass");
else
adverDiv.setAttribute('class',"adverAreaClass");
bodys.appendChild(adverDiv)
adverDiv=document.getElementById("adverArea");
adverDiv.style.width="95%"
//adverDiv.innerHTML="4444444444444444444444"
this.calledObj.adverArea=adverDiv
	},
enableNetoSearch:function()
	{
this.netosearch=true;
var bodys = document.getElementById(this.calledObj.mySearchAreaName);
var tempDiv     = document.createElement("div");
tempDiv.setAttribute('id',"netoSearchArea");//----------------------------------------------------
tempDiv.setAttribute('width',"100%");
tempDiv.setAttribute('height',"50");
tempDiv.setAttribute('align',"right");
bodys.appendChild(tempDiv)
tempDiv=document.getElementById("netoSearchArea");
if(ie)
tempDiv.setAttribute('className',"netoSearchAreaClass");
else
tempDiv.setAttribute('class',"netoSearchAreaClass");
tempDiv.style.width="95%"
tempDiv.style.display="none"

//tempDiv.innerHTML="4444444444444444444444"
this.calledObj.searchNetoArea=tempDiv
	}
}


var netoIconObject=new Object();
netoIconObject.initial=function(type,overIconImage,outIconImage,overIconCallBackFunct,outIconCallBackFunct,clickIconCallBackFunct,overIconAlt,outIconAlt,id)
 {
this.type=type;
this.iconObj=null;
this.overIconImage=overIconImage;
this.outIconImage=outIconImage;
this.overIconCallBackFunct=overIconCallBackFunct;
this.outIconCallBackFunct=outIconCallBackFunct;
this.clickIconCallBackFunct=clickIconCallBackFunct;
this.overIconAlt=overIconAlt;
this.outIconAlt=outIconAlt;
this.textual=null
this.id=id
	if(this.type=="i")
this.createIcon();
if(this.type=="t")
this.createIconText();
 }
netoIconObject.initial.prototype={
createIconText:function()
	{
var tempicon=document.createElement("span");
this.textual=document.createTextNode(this.overIconAlt)
if(ie)
tempicon.setAttribute('className',"textualIconClass");
	else
tempicon.setAttribute('class',"textualIconClass");

//tempicon.appendChild(document.createTextNode(this.overIconAlt))
//tempicon.setAttribute('border',0);
//tempicon.setAttribute('alt',this.overIconAlt);
//tempicon.setAttribute('src',netoPath+this.overIconImage);
tempicon.setAttribute('id',"icon"+this.id);
if(this.overIconCallBackFunct!="")
		{
tempicon.onmouseover=function(e){}
		}
if(this.outIconCallBackFunct!="")
		{
tempicon.onmouseout=function(e){}
		}
if(this.clickIconCallBackFunct!="")
		{
//alert(this.clickIconCallBackFunct+"--")
tempicon.onclick=function(e){
	
var temptarget=window.event? event.srcElement : e.target
var tempid=temptarget.id.replace("icon","")
tempid=parseInt(tempid,10)
eval(netoSearch.structure.iconobjects["i"+tempid].clickIconCallBackFunct+"()")	
}
		}
this.iconObj=tempicon;
	},




createIcon:function()
	{
var tempicon=document.createElement("img");
tempicon.setAttribute('border',0);
tempicon.setAttribute('alt',this.overIconAlt);
tempicon.setAttribute('src',netoPath+this.overIconImage);
tempicon.setAttribute('id',"icon"+this.id);
if(this.overIconCallBackFunct!="")
		{
tempicon.onmouseover=function(e){}
		}
if(this.outIconCallBackFunct!="")
		{
tempicon.onmouseout=function(e){}
		}
if(this.clickIconCallBackFunct!="")
		{
//alert(this.clickIconCallBackFunct+"--")
tempicon.onclick=function(e){
	
var temptarget=window.event? event.srcElement : e.target
var tempid=temptarget.id.replace("icon","")
tempid=parseInt(tempid,10)
eval(netoSearch.structure.iconobjects["i"+tempid].clickIconCallBackFunct+"()")	
}
		}
this.iconObj=tempicon;
	}

}
