function getScrollTop(){
	if(document.documentElement&&document.documentElement.scrollTop){
		return document.documentElement.scrollTop;//FF3(strict),IE7(strict),OP9
	}else if(document.body.scrollTop){
		return document.body.scrollTop;//FF2-3(loose),IE7(loose),IE6(loose),SF3
	}
	return 0;//FF2(strict),IE6(strict)
}
function switchArrow(target1){
	var arrow=$get(target1);
	if(arrow!=null&&arrow!='undefined'){
		var parts=arrow.src.split('/');
		var img=parts[parts.length-1];
		arrow.src=(img=='bucket-arrow-off.gif')?'/images/bucket-arrow-on.gif':'/images/bucket-arrow-off.gif';
	}
}
//<li><a href="" onmouseover="switchBullet(this)" onmouseout="switchBullet(this)"></a></li>
function switchBullet(a){
	var li=a.parentNode;
	if(li!=null&&li!='undefined'){
		var img=li.style.listStyleImage;
		li.style.listStyleImage=(img=='url(/images/arrow-on.gif)')?'url(/images/arrow-off.gif)':'url(/images/arrow-on.gif)';
	}
}
function toggleVis(id){
	var div=$get(id);
	div.style.display=(div.style.display=='block'||div.style.display=='')?'none':'';
}
function toggleText(id){
	var div=$get('div'+id);
	var lnk=$get('lnk'+id);
	div.style.overflow=(div.style.overflow=='hidden'||div.style.overflow=='')?'visible':'hidden';
	div.style.height=(div.style.overflow=='hidden'||div.style.overflow=='')?'15px':'auto';
	lnk.innerHTML=(div.style.overflow=='hidden')?'more...':'...less';
}
function previewShow(divId,e){
	if(document.all)e=event;
	clientX=e.clientX;clientY=e.clientY;
	var div=$get(divId);
	div.style.left=(clientX-5)+'px';
	var scrollTop=getScrollTop();
	div.style.top=(scrollTop+clientY)+'px';
	div.style.display='';
}
function previewHide(divId){
	var div=document.getElementById(divId);
	div.style.display='none';
}
function openDatasheet(pid){
	var height=document.body.clientHeight;
	datasheetWindow=window.open('/Products/Datasheet.aspx?p='+escape(pid),'Datasheet','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,hotkeys=no,width=425,height='+height+'px');
	datasheetWindow.focus();
}
function openRFQ(key,val){
	rfqWindow=window.open('/RFQ/Popup.aspx?'+key+'='+escape(val),'RFQ','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,hotkeys=no,width=425,height=600');
	rfqWindow.focus();
}
function openPhoto(url){
	photoWindow=window.open('/Image.aspx?src='+escape(url),'Photo','menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,hotkeys=no,width=300,height=300');
	photoWindow.focus();
}
