function resizeImage200w(obj) {
    obj.width = obj.width >= 200 ? 200 : auto;
//    obj.width = obj.width > 200 && obj.width > obj.height ? 200 : auto;
//    obj.height = obj.height > 200 ? 200 : auto;
}















// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false


// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s
var bwc_tempX = 0
var bwc_tempY = 0


var bwc_div_ids=new Array();


// Main function to retrieve mouse x-y pos.s


function bwc_findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}



function getMouseXY(e) {
	  if (IE) { // grab the x-y pos.s if browser is IE
	    bwc_tempX = event.clientX + document.body.scrollLeft
	    bwc_tempY = event.clientY + document.body.scrollTop
	  } else {  // grab the x-y pos.s if browser is NS
	    bwc_tempX = e.pageX
	    bwc_tempY = e.pageY
	  }  
	  // catch possible negative values in NS4
	  if (bwc_tempX < 0){bwc_tempX = 0}
	  if (bwc_tempY < 0){bwc_tempY = 0}  
	
	for(x in bwc_div_ids) {
		bwc_div_ids[x].toggleDiv();	  
	}
	  
	  // show the position values in the form named Show
	  // in the text fields named MouseX and MouseY
	  return true
}



// ref: http://www.technorealm.co.uk/scripts/mouseovershowtext.html

function bwc_div(div_id, wid, hei){

	this.id=div_id;
	this.div=this.id+'_div';
	this.iframe=this.id+'_iframe';
	this.width=wid
	this.height=hei
	this.show=0;
	this.fix=null;
	this.offset= [ -this.width*2/3, -this.height-10];
	this.in_window=false;
	
	document.write('<div id="'+this.div+'" align="center" style="background-color:transparent" >')
	document.write('<iframe name="'+this.iframe+'"  width='+this.width+'; height='+this.height+' allowtransparency="true" FRAMEBORDER=0 scrolling="no" src="transparent.htm"></iframe>')
	document.write('</div>')
	document.write('<style type="text/css">#'+this.div+' {position:absolute; top: 0; left: 0; width:100; height:100; visibility:hidden;  }</style>')
	

	
/*	this.location=function (loc) {
		document.(this.iframe).location=loc;	
	}*/
	this.toggleDiv=function () {
	
		if(this.fix!=null){
			windows_X = this.fix[0]+this.offset[0] ;
			windows_Y = this.fix[1]+this.offset[1] ;
		} else {
			windows_X = bwc_tempX+this.offset[0] ;
			windows_Y = bwc_tempY+this.offset[1] ;
		}
		windows_X = !this.in_window ? windows_X : windows_X > 0 ? windows_X : 0;
		windows_Y = !this.in_window ? windows_Y : windows_Y > 0 ? windows_Y : 0;
			
		if (this.show=="1"){			
	
			if (document.layers) {
				document.layers[''+this.div+''].visibility = "show"
				document.layers[''+this.div+''].top = windows_Y
				document.layers[''+this.div+''].left = windows_X
			}
			else if (document.all) {
				document.all[''+this.div+''].style.visibility = "visible"
				document.all[''+this.div+''].style.top = windows_Y
				document.all[''+this.div+''].style.left = windows_X
			}
			else if (document.getElementById) {
				document.getElementById(''+this.div+'').style.visibility = "visible"	
				document.getElementById(''+this.div+'').style.top = windows_Y
				document.getElementById(''+this.div+'').style.left = windows_X
			}
			
		} else if(this.show=="0") {
					if (document.layers) document.layers[''+this.div+''].visibility = "hide"
					else if (document.all) document.all[''+this.div+''].style.visibility = "hidden"
					else if (document.getElementById) document.getElementById(''+this.div+'').style.visibility = "hidden"	
	
		}
	
	}
}

