function onoff(id) {
var item = document.getElementById(id);
if(item.style) {
	if(item.style.display == "none"){ item.style.display = ""; 
	}else {item.style.display = "none"; 
	}
}else{ item.visibility = "show"; item.style.zIndex = "3"; 
}
}

function ShowOrHide(d1, d2) {
	  if (d1 != '') onoff(d1);
	  if (d2 != '') onoff(d2);
}

function popwin(url,title){
var newwin = window.open(url, title, 'width=450,height=350,resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
newwin.focus();
}

function movehtml(from,to){
document.getElementById(to).innerHTML=document.getElementById(from).innerHTML;
document.getElementById(from).innerHTML = '';
}
  
function posinwin(thediv,theoffset){
var winheight = document.documentElement.clientHeight;
var divpos = document.getElementById(thediv).offsetTop + theoffset;

if(divpos > winheight) return true;

}

function external() {
 if (document.getElementsByTagName) {
  var i, a;
  a = document.getElementsByTagName('a');
  for (i in a) {
   if (a[i].getAttribute('href') && 
       a[i].getAttribute('rel') == 'external') a[i].target = '_blank';
  }
 }
}

function tasks(){
if(posinwin('crb', 30)) movehtml('crf','cra');
if(posinwin('clb', 195)) movehtml('clf','cla');
//external();
}

function refresh(){
document.location=document.location;
}