function Cover(bottom, top, ignoreSize) {
    var location = Sys.UI.Control.getLocation(bottom);
    top.style.position = 'absolute';
    top.style.top = location.y + 'px';
    top.style.left = location.x + 'px';
    if (!ignoreSize) {
        top.style.height = bottom.offsetHeight + 'px';
        top.style.width = bottom.offsetWidth + 'px';
    }
}

function toggle(element, show) {
    if(show){
        new Effect.Appear($(element));
    } else {
        new Effect.Fade($(element));
    }
}     



function ele(id)
{
return document.getElementById (id);
}

function hide_ele ( id ) {
	ele(id).style.display = 'none';
}

function show_ele ( id ) {
	ele(id).style.display = 'block';
}

function myDate() {
var now = Date();
//document.write(now.getDate());
//document.write(now.getMonth());
//document.write(now);
document.write(now.slice(0,10));
}

function opacity ( id, val) {
	var el = ele(id);
	ieval=val*100;
	el.style.opacity = val;
	el.style.filter = "alpha(opacity=" + 'ie_val' + ")" ;
}

function set_bkg ( id, val) {
	ele(id).style.background = val;
}




function reset_bkg (pg, mn, val) {
		
	var bval = '#3a5d85'
	
	ele(mn).style.background = val;
			 
   if (pg=='em') {
	    	ele('mn1').style.background = bval;
	} else
	if  (pg=='ho') {
	    	ele('mn2').style.background = bval;
	} else
	if  (pg=='se') {
	    	ele('mn3').style.background = bval;
	} else
	if  (pg=='te') {
	    	ele('mn4').style.background = bval;
	} else
	if  (pg=='sa') {
	    	ele('mn5').style.background = bval;
	} else
	if  (pg=='co') {
	    	ele('mn6').style.background = bval;
	} else
	if  (pg=='si') {
	    	ele('mn7').style.background = bval;
	} 
		
}     


function reset_opacity (pg, mn) {

   new Effect.Opacity( mn, { from: 1.0, to: 1.0 });
	 
   if (pg=='em') {
	    new Effect.Opacity('mn1', { from: 0.2, to: 0.3});
	} else
	if  (pg=='ho') {
		new Effect.Opacity('mn2', { from: 0.5, to: 0.3});
	} else
	if  (pg=='se') {
		new Effect.Opacity('mn3', { from: 0.5, to: 0.3});
	} else
	if  (pg=='te') {
		new Effect.Opacity('mn4', { from: 0.5, to: 0.3});
	} else
	if  (pg=='sa') {
		new Effect.Opacity('mn5', { from: 0.5, to: 0.3});
	} else
	if  (pg=='co') {
		new Effect.Opacity('mn6', { from: 0.5, to: 0.3});
	} else
	if  (pg=='si') {
		new Effect.Opacity('mn7', { from: 0.5, to: 0.3});
	} 
		
}     

