function ShowDiv(id,hideIds,oldstyle,newstyle){
	var arrShowIds=id.split(",");
	var arrHideIds=hideIds.split(",");
	var objElement;

	for(var i=0;i<arrShowIds.length;i++){
		if(arrShowIds[i]!=""){
			objElement=document.getElementById(arrShowIds[i]);
			if(objElement!=null)objElement.style.display="";
			objElement=document.getElementById(arrShowIds[i]+"Tab");
			if(objElement!=null)objElement.className="active";
		}
	}

	for(var i=0;i<arrHideIds.length;i++){
		if(arrHideIds[i]!=""){
			objElement=document.getElementById(arrHideIds[i]);
			if(objElement!=null)objElement.style.display="none";
			objElement=document.getElementById(arrHideIds[i]+"Tab");
			if(objElement!=null)objElement.className="inactive";
		}
	}

}


function checkSelect(thesource,param1,param2){

	var toshow;
	var tohide;
	var theelement = document.getElementById(thesource);

	if(theelement.checked == true ) {
		toshow = param1;
		tohide = param2;	
   	}

	ShowDiv(toshow,tohide);

}



function checkCreditCard(thesource,thevalue,param1,param2){

	var toshow;
	var tohide;

	if(document.getElementById(thesource).value == thevalue ) {
		toshow = param1;
		tohide = param2;		
   	}

	ShowDiv(toshow,tohide);

}

function checkmulti() {

	var multidest = document.getElementById('multidestino');

	if(multidest.checked == true ) {
		ShowDiv('','ofertas');
   	} else {
		ShowDiv('ofertas','');
	}
}