prova così m anon garantisco

codice:
clearbrowseredge:function(obj, whichedge){
    var mySize=800; //px della tua larghezza massima. impostalo a false per considerare il body
	
    var edgeoffset=0

	if (whichedge=="rightedge"){

		var windowedge=
            mySize || 
            document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15

		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth

		if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?

			edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth

	}

	else{

		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset

		var windowedge=
            mySize ||
            document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18

		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight

		if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?

			edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight

			if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?

				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge

		}

	}

	return edgeoffset

}