/* STOP THE FLICKER code ---------------------------------- */
if (document.getElementById && document.getElementsByTagName && document.createTextNode) {
	document.write('<link rel="stylesheet" type="text/css" href="/css/js_hide.css" />');
}



var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = 2
    StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:
        //alert("You have just wasted 10 seconds of your life.");
		  //opacity('icon', 0, 99, 200);
		  fadeIn(100);
    }
    else
    {
        //self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay);
    }
}

/* check item ======================================================= */
function checkitem(cbox) {
	box = eval(cbox);
	box.checked = !box.checked;
}

/* disable form ======================================================= */
function disableForm(theform) {
	if (document.all || document.getElementById) {
		for (i = 0; i < theform.length; i++) {
			var tempobj = theform.elements[i];
			if (tempobj.type == "submit" || tempobj.type.toLowerCase() == "reset") {
				tempobj.value="Please Wait...";
			}
		}
	}
}


/* turn off stuff ======================================================= */

function showHide(id) {
	el = document.getElementById(id);
	//alert(el.style.display);
	if (el.style.display == 'none' || el.style.display == '')
	{
		el.style.display = 'block';
		el = document.getElementById('more' + id);
	} else {
		el.style.display = 'none';
		el = document.getElementById('more' + id);
	}
}
