function copyToClip(myId) {
	document.getElementById(myId).focus(); document.getElementById(myId).select(); 
	myData = document.getElementById(myId).value;

	if(window.clipboardData) { clipboardData.setData('Text',myData); }
	else { alert(ieOnly); return false;}
}

function selectText(myId){ document.getElementById(myId).focus(); document.getElementById(myId).select(); }

function popUp(link,w,h) {
  newWin = window.open(link,'newWin', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+w+',height='+h+', top=100, left=300');
  return false;
}

function windowPopup(url)
{
	// replace '&amp;' by '&'
	url = url.replace(/\&amp;/g, '&');
	
	// open popup
	var win = window.open(url, 'popup');
	
	// popup blocked
	if (!win)
	{
		// display message
		var message = (typeof(langPopupBlockerTurnOff) == 'undefined')  ? 'Turn off your popup blocker please' : langPopupBlockerTurnOff;
		alert(message);
		return;
	}
	
	// focus popup
	win.focus();
}

window.onload = function() {
	if (document.all) {
		links = document.getElementById('topmenu').getElementsByTagName('a');
		for (var i=0;i<links.length;i++) {
			if (links[i].nextSibling && links[i].id != 'home') {
                   ifr = document.createElement('iframe');
				ifr.style.height = links[i].nextSibling.offsetHeight + 'px';
				links[i].appendChild(ifr);
			};
		}
	}

	if (document.getElementById('filters1')) {
		el = document.getElementById('filters1');
		dt = el.getElementsByTagName("dt");
		for(var i=0;i<dt.length;i++){
			el = dt[i].getElementsByTagName('input')[0];
			if (el.value == 3)  {
            	el.onclick = function() {
					document.getElementById('view').value = 'year';
				}
			} else {
	    	    el.onclick = function() {
					document.getElementById('view').value = 'month';
				}
			}
		}
	}

}