window.onload = function(){
	var parm = 'open';
	setTimeout(function(){yourselect(parm);}, 1000);
}
function yourselect(parm){
	id = 'yourselect';
	if(parm == 'close'){
		document.getElementById(id).className = 'invisible';
	}
	else {
		if(document.getElementById('additional').className == 'invisible'){
			document.getElementById(id).className = 'visible';
			bgOpen(id, 0);
		}
	}
}
function contact(parm){
	id = 'contact';
	//if(parm == 'close'){
	if(document.getElementById(id).className == 'visible'){
		bgClose(id, 100);
	}
	else {
		document.getElementById(id).className = 'visible';
		bgOpen(id, 0);
	}
}
function addinfo(parm){
	var uid = 'additional';
	var mid ="addMP";
	var wid ="addMCE";
	if(parm == 'mp'){
		
		if(document.getElementById(mid).className == 'invisible'){
			//alert("hi");
			document.getElementById(wid).className = 'invisible';
			document.getElementById(mid).className = 'visible';
			bgOpen(mid, 0);
		}
	}
	else if(parm == 'mce'){
		if(document.getElementById(wid).className == 'invisible'){
			document.getElementById(mid).className = 'invisible';
			document.getElementById(wid).className = 'visible';
			bgOpen(wid, 0);
		}
	}
	if(document.getElementById(uid).className == 'invisible'){
		yourselect('close');
		document.getElementById(uid).className = 'visible';
		bgOpen(uid, 0);
	}
	else if (parm == 'close'){
		bgClose(uid, 100);
		setTimeout(function(){yourselect('open');}, 1000);
	}
}

function toggleClass(id, before, after){
				if(!after){
					after = before;
					before = false;
				}
				var attr = document.getElementById(id).className;
				if(attr.indexOf(" "+ after) == -1 && attr.indexOf(after) != 0){
					if(before && attr.indexOf(before) != -1){
						attr = attr.replace(before, "");
					}
					attr = after + " " + attr;
					document.getElementById(id).setAttribute("class", attr); 
				}
				alert(after);	
			}
function bgOpen(id, opa){
		//alert(imgLbg[0]);
		//getBg = 
		//document.getElementById('multiform').innerHTML += opa+"<br>";
		opa += 12;
		if(opa < 100){
			
			//getBg.opacity = ;
			//getBg.filter = '';
			document.getElementById(id).setAttribute('style','opacity:0.'+opa+';');
			document.getElementById(id).style.filter = 'Alpha(opacity='+opa+')';
			setTimeout(function(){bgOpen(id, opa);}, 60);
		}
		else{
			document.getElementById(id).setAttribute('style','opacity:1;');
		}
	}
function bgClose(id, opa){
		getBg = document.getElementById(id);
		opa -= 12;
		if(opa >= 12){
			getBg.style.opacity = '0.'+((opa<10)?'0'+opa:opa);
			getBg.style.filter = 'Alpha(opacity='+opa+')';
		
			setTimeout(function(){bgClose(id, opa)}, 60);
		}
		else{
			getBg.className = "invisible";
		}
	}

