function toggleLayer( whichLayer , status) {
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
	vis.display = (status)?'block':'none';
}
//-->



function returnObjReference(elemname) {
	var elem;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( elemname );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[elemname];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[elemname];
	return elem;
}


function displayScheme(obj, whichElem) {
	elemArray = ["time","minute","timedrop","colon","minutedrop","city","cityDescription"];
	vis = (obj.checked == true)?"visible":"hidden";
	for (counter=0;counter < elemArray.length; counter++) {
		elem = returnObjReference(whichElem + elemArray[counter]);
		elem.style.visibility = vis;
	} 
	return true;
}

function printWindow(location) {
	newwindow = window.open(location,'Utskrift','width=600,height=500,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function graphWindow(location) {
	newwindow = window.open(location,'Horoskophjul','width=700,height=600,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function clearText(field) {
	if (field.defaultValue == field.value) {
  	field.value = '';
     field.style.color = '#000000';
	} else { if (field.value == '')
  	field.value = field.defaultValue;
     field.style.color = '#666666';
	}
}

