<!--
//  ////////////////////////////////////////////////////////////////////////////////
//  specific ///////////////////////////////////////////////////////////////////////

function add_event(myObj,handler,addFunction){  //  add eventhandler onload to keep HTML clean
  addFunction = (ie)? new Function(addFunction) : addFunction;
  if(myObj)
    myObj.setAttribute(handler,addFunction);
}

function setMap(_this, show){
	setMap_(_this, show, obj('navLeft').getElementsByTagName('a'));
	setMap_(_this, show, obj('navRight').getElementsByTagName('a'));
	_this.style.borderBottomStyle	= 'none';

	function setMap_(_this, show, arr_aNav){
	  len_aNav	= arr_aNav.length;
		for(var i=0;i<len_aNav;i++){
			aThis	= arr_aNav[i];
		  aThis.style.borderBottom	= 'solid 2px #4682B4';
	    if(show && !aThis.href){
			  add_event(aThis, "onclick", "hideMap(this);this.blur();");
			  aThis.href	= "javascript:;"
	    }
		}
	}
}

function showMap(_this){
  generator_			= obj('generator');
  form_ 	    		= generator_.getElementsByTagName('form')[0];
  if(!obj('map1')){
		formInnerHTML		= form_.innerHTML;
		form_.innerHTML	= "<div id='map1'>" +
		                     obj('list').innerHTML + obj('text').innerHTML +
		                   "</div>";
	  setMap(_this, 1);
  }
}

function hideMap(_this){
	form_.innerHTML	= formInnerHTML;
	setMap(_this, 0);
}

function setGenerators(_this, show, msg){
	obj("i728x90Link").style.display	= (show)? "block" : "none";
	obj("leaderboard0").style.display	= (show)? "none"  : "block";
	var show	= (show)? 0 : 1;
	add_event(_this, "onclick",
		"setGenerators(this, "+show+", '"+_this.innerHTML+"');this.blur();");
	_this.innerHTML	= msg;
}

//google search form
dgf = d.getElementsByTagName("form");

function setSearchForm(dgf){
  dgfNum										= dgf.length - 1;
  dgf[dgfNum].innerHTML     = '';
  dgf[dgfNum].style.display = 'none';
}

//google iframes
  dgi                       = d.getElementsByTagName("iframe");

function setIframeId(dgi, id){
  dgiNum                    = dgi.length - 1;
  dgi[dgiNum].id            = id;
}

function setIframeClass(dgi, myClass){
  dgiNum                    = dgi.length - 1;
  dgi[dgiNum].className     = myClass;
}

function setIframeClearTimeout(dgi){
  dgiNum                    = dgi.length - 1;
  add_event(dgi[dgiNum], "onmouseover", "clearTimeout(searchST1)");
  add_event(dgi[dgiNum], "onmouseout", "searchST1=setTimeout('setGoogleSearch(0)',1)");
}

function setGoogleSearch(toggle){
  this_ 								  = obj("search");
  iframe0								  = d.getElementById('leaderboard0');

  iframe0.style.display		= (toggle)? 'none' : 'block';

//storing states or toggling classNames is qirky in IE here
//flash in other iframes (freeglitters.com) may mess up execution
  this_.style.top 				= (toggle)? '10px'           : '11px';
  this_.style.left				= (toggle)? '12px'           : '13px';
  this_.style.width				= (toggle)? '812px'          : '100px';
  this_.style.border	  	= (toggle)? 'solid 1px gray' : 'solid 0px gray';
  this_.style.background	= (toggle)? '#EFEFEF'        : 'white';
  this_.sbi.style.width		= (toggle)? '796px'          : '96px';

  if (!opera && !khtml){
  	//clearTimeout probs
  	//use Amazon banners with opera & khtml
  	obj("searchReferral").style.display	= (toggle)? 'block' : 'none';
  }
}

//Amazon iframes
function setAmazonAdPos(){
	if (d.getElementById("leaderboard1")){
//  d.getElementsByTagName("body")[0].innerHTML += amazonAd;
	  d.getElementById("leaderboard1").innerHTML   = leaderboard1Ad = "";
	  d.getElementById("leaderboard2").innerHTML   = leaderboard2Ad = "";
	  d.getElementById("leaderboard3").innerHTML   = leaderboard3Ad = "";
	  //if above is inactive, below is needed
	  d.getElementById("leaderboard1").className   = "leaderDiv1";
	  d.getElementById("leaderboard2").className   = "leaderDiv1";
	  d.getElementById("leaderboard3").className   = "leaderDiv1";
	}
}

//for inc/js/amazonAd-(en|es|de).js
price  = "";        //all prices
price  = "&nou=1";  //only new price
price  = "&npa=1";  //no price


/////////////////////////////
  dgb                     = d.getElementsByTagName("body");
  dgi                     = d.getElementsByTagName("iframe");

function setIframePos(dgi, gTop, gLeft, gWidth, gHeight, gColor){
  var dgiNum          		= dgi.length - 1;
  var thisIframe      		= dgi[dgiNum];
  thisIframe.style.top  	= gTop    + "px";
  thisIframe.style.left		= gLeft   + "px";
  thisIframe.style.width	= gWidth  + "px";
  thisIframe.style.height	= gHeight + "px";
  thisIframe.style.zIndex	= 100;
//  thisIframe.style.border  = "solid 1px " + gColor;
}

function mkIframeBorder(dgb, dgi, newTop, newLeft, newWidth, newHeight, myClassName){
  var dgiNum							= dgi.length - 1;
  var thisIframe        	= dgi[dgiNum];
  var newDiv            	= d.createElement("div");
  dgb[0].appendChild(newDiv);
  newDiv.style.top    		= parseInt(thisIframe.style.top)    + newTop    + 'px';
  newDiv.style.left   		= parseInt(thisIframe.style.left)   + newLeft   + 'px';
  newDiv.style.width  		= parseInt(thisIframe.style.width)  + newWidth  + 'px';
  newDiv.style.height 		= parseInt(thisIframe.style.height) + newHeight + 'px';
  newDiv.className    		= myClassName;

}
/////////////////////////////
window.onload=function(){
//	myLegend	= document.getElementsByTagName("legend");
//	for(var x=0;x<myLegend.length-1;x++){
//		myLegend[x].innerHTML	= '';
//	} // rounded_corners_lite.js messes up here, so no CSS

  setAmazonAdPos();
//  searchForm	= obj("search");
//
//  add_event(searchForm, "onmouseover",
//            "searchST0=setTimeout('setGoogleSearch(1)',1)");
//  add_event(searchForm, "onmouseout",
//            "searchST1=setTimeout('setGoogleSearch(0)',1)");
}


//  	setIframeClip(dgi, "17px, auto, auto, auto");
//function setIframeClip(dgi, clip){
//  dgiNum                    = dgi.length - 1;
//  dgi[dgiNum].style.clip    = "rect("+clip+")";
//}
//  -->