// $Header: $
/***************************************************************************
* Automatic Image Popup
* Copyright 2002 by David Schontzler | www.stilleye.com
* Free to use under GNU General Public License as long as this message
*  remains intact.
* Description:  Automate your image popup windows (centered and sized)
* URI: http://www.stilleye.com/scripts/iPop
***************************************************************************
* Version: 1.0
***************************************************************************/
function iPop(img,w,h,ttl)
{
	var iPopURL = '/ipop.html' // set as location of ipop.html
	var url = iPopURL + '?' + img + (ttl ? '&'+escape(ttl) : '')
	var l = (screen.width-w)/2
	var t = (screen.height-h)/2
	var attribs = 'width='+w+',height='+h+',left='+l+',top='+t
	open(url,'imgWin',attribs)
	return false;
}

/****************************************************
*	Creates and centers a popup window
*		by LWD-hk 20030722
****************************************************/
function rsPopUp(url,w,h,ttl)
{
	var l = (screen.width-w)/2
	var t = (screen.height-h)/2
	var attribs = 'scrollbars=yes,resizable=yes,width='+w+',height='+h+',left='+l+',top='+t
	open(url,'newWindow',attribs)
	return false;
}

/****************************************************
*	DOM image rollover:
*		by Chris Poole
*		http://chrispoole.com
*
*		Keep this notice intact to use it :-)
****************************************************/

function domRollover() {
if (!document.getElementById) return;
	var imgTemp=new Array();
	var imgarr=document.getElementsByTagName('img');
	for (i=0;i<imgarr.length;i++){
	if (imgarr[i].getAttribute('hsrc')){
			imgTemp[i]=new Image();
			imgTemp[i].src=imgarr[i].getAttribute('hsrc');
			imgarr[i].setAttribute('xsrc', imgarr[i].getAttribute('src'));
			imgarr[i].onmouseover=function(){
				this.setAttribute('src',this.getAttribute('hsrc'))
			}
			imgarr[i].onmouseout=function(){
				this.setAttribute('src',this.getAttribute('xsrc'))
			}
		}
	}
}
domRollover();

/****************************************************
*	Show/Hide DIV Layer by ID:
*		by LWD-hk 20030312
****************************************************/
function divVisibility(id,vis)
{var dddd;
 if(document.all)
  {dddd=document.all[id].style;
   dddd.visibility = vis ? "visible" : "hidden";
  }
 if(document.layers)
  {dddd=document.layers[id];
   dddd.visibility = vis ? "show" : "hide";
  }
}


/****************************************************
*	Get Body background color:
*		by LWD-hk 20030722
****************************************************/
function prodHighl(o) { o.style.backgroundColor = document.body.style.backgroundColor; }
function prodNormal(o) { o.style.backgroundColor = 'white'; }
