<script>
var status=1;
function changeObjectVisibility(objectId, newVisibility) {
// first get a reference to the cross-browser style object
// and make sure the object exists
var styleObject = getStyleObject(objectId);
if(styleObject) {
styleObject.visibility = newVisibility;
return true;
} else {
// we couldn't find the object, so we can't change its visibility
return false;
}
}
function getStyleObject(objectId) {
// checkW3C DOM, then MSIE 4, then NN 4.
//
if(document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId).style;
}
else if (document.all && document.all(objectId)) {
return document.all(objectId).style;
}
else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
function toggle() {
if (status==1) {
status=0;
changeObjectVisibility('container','visible');
} else {
status = 1;
changeObjectVisibility('container','hidden');
}
}
</script>
// setStyleSheet() by Paul Sowdon
// http://www.alistapart.com/articles/alternate/
function setStyleSheet ( title ) {
var i, a, main;
for ( i = 0; ( a = document.getElementsByTagName("link")[i] ); i++ ) {
if ( a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") ) {
a.disabled = true;
if ( a.getAttribute("title") == title ) a.disaled = false;
}
}
}