function smallerWindow(url) {
	var userW = getWidth();
	var userH = getHeight();
	var newW = userW - 100;
	var newH = userH - 5;
	window.open(url,"ExternalLink",'width='+newW+',height='+newH+',toolbar=no,location=yes,status=no,menubar=no,scrollbars=yes,resizable=yes');
}
function getWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
	return myWidth;
}
function getHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
	return myHeight;
}
function doHomeNews(numItems, items) {
	var objArray = items.split('|');
	for (var i=0; i<numItems; i++) {
		newsArray[i] = objArray[i];
	}
	newsShow();
	setInterval('newsShow()',5000);
}
function newsShow() {
	var numItems = newsArray.length;
	for (var i=0;i<numItems;i++) {
		var item = $(newsArray[i]);
		if (i==currentItem) {
			Element.show(item);
		} else {
			Element.hide(item);
		}
	}
	currentItem++;
	if (currentItem >= newsArray.length) {
		currentItem = 0;
	}
}