// HIDING ELEMENTS 

function hide(elid){
	document.getElementById(elid).style.visibility="hidden";
	document.getElementById(elid).style.display="none";
}


function showblock(elid){
	document.getElementById(elid).style.visibility="visible";
	document.getElementById(elid).style.display="block";
}


function showinline(elid){
	document.getElementById(elid).style.visibility="visible";
	document.getElementById(elid).style.display="inline";
}


function hideClass(cName){
var divs=document.getElementsByTagName('div');	
		for (i=0; i < divs.length; i++) {
			if (divs[i].className==cName){
			divs[i].style.visibility="hidden";
			divs[i].style.display="none";
			}
		}
}

function showClass(tag,cName,disp){
var tags=document.getElementsByTagName(tag);	
		for (i=0; i < tags.length; i++) {
			if (tags[i].className==cName){
			tags[i].style.visibility="visible";
			tags[i].style.display=disp;
			}
		}
}



function slideOpen(id,h){
if (h < 300){
h += (100-h)/8
document.getElementById(id).style.height = h + 'px';
id2=id;
h2=h;
t=setTimeout("slideOpen(id2,h2);",5);
}
}

function openBlock(elid){
document.getElementById(elid).style.height="1px";
showblock(elid);
slideOpen(elid,1);
}



function openAgreement(key){
hideClass('start_agreement');
ob='start_'+key;
openBlock(ob);
showClass('a','btn small','inline');
bb='btn_'+key;
hide(bb);
}

function closeAgreement(){
showClass('a','btn small','inline');
hideClass('start_agreement');
}



function doPreview(){

document.getElementById('preview_details').value=document.getElementById('details').value;
document.previewform.submit();
}


