As an experiment, I've modified the layout of Unbecoming Levity to use collapsible sidebars. This allows me to use more screen real estate for the actual content of the articles. What do you think of this look? Better? Worse? Please share your comments…
Making collapsible sections was easy. First I had to write a little javascript function which I called CComponentToggle. Click this expander to see the necessary javascript: 
var img_prefix = "<url of my image directory>";
var img_expand = "comp_expand.gif";
var img_collapse = "comp_collapse.gif";
function CComponentToggle(id_number)
{
var img_id = "CCI_" + id_number;
var comp_id = "CCC_" + id_number;
if (document.getElementById)
{
var current_state = document.getElementById(img_id).src;
if (current_state == img_prefix + img_expand)
{
document.getElementById(comp_id).style.display = "block";
document.getElementById(img_id).src = img_prefix + img_collapse;
}
else
{
document.getElementById(comp_id).style.display = "none";
document.getElementById(img_id).src = img_prefix + img_expand;
}
}
}
When this function is called and passed an ID like “sample”, it goes and looks for an image with the ID “CCI_sample”. It checks to see what the image looks like. If it is an “expand” image (
), that means the user is trying to expand a hidden section. If it is a collapse image (
), that means the user is trying to collapse a section. Once it makes that determination, the function goes looking for an element with the ID “CCC_sample” and either makes it visible or invisible as necessary. Then it modifies the original image the user clicked on to change the expander into a collapser or vice versa.
Pretty simple.
Of course I'm concerned about compatibility across different browsers, so if anyone can offer tips as to how to modify this function to make it as compatible as possible, I'm all ears.
When placing the order for our supply of soda at work here, my distributor said “Wanna try '
It's been 10 minutes since I took a couple hearty swallows and my tongue still feels weird. C2 is smoother than Coke Classic, sweeter, and just all around bad. It reminded me of the nauseating beverage “Tab”. There was a definite and long lasting Diet Cola-esque aftertaste that I'm still trying to get out of my mouth. Even the mouth feel is not quite right… like I've been drinking spit or something. Blech.




The politically charged blog