function showCollections(collGroupId){
	var arr = new Array();
	var ul = document.getElementById("coll_group_list");
    arr = ul.getElementsByTagName("li");
    for(var i = 0; i < arr.length; i++){ 
    	arr[i].className="";
    }
	document.getElementById(collGroupId+"_li").className="active";
	var pageAction = document.getElementById("serverUrl").value+"/get-landing-response.do";
	var parameters = "cgid="+collGroupId+"&ssimn=Collection-Landing_Main-Well";
	ajaxPost(pageAction,parameters+"","loadMainWell(common_request,\"landing_main_well\")","landing_main_well");
}

function ajaxPost(url,reqParameters,callBack,mainDivId)
{
	var common_request=document.all?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();
	if(mainDivId!=undefined
		&& mainDivId!=""){
		ajaxLoadingLayer(mainDivId);
	}
	common_request.onreadystatechange=function(){
 		if(common_request.readyState==4){
  			if(common_request.status==200){ 	
        		try{eval(callBack);}catch(e){}
		  	}    
 		}
	}
	common_request.open("POST",url,true);
    common_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    common_request.setRequestHeader("Content-length", reqParameters.length);
    common_request.setRequestHeader("Connection", "close");	
	common_request.send(reqParameters);
}

function ajaxLoadingLayer(objId){
	document.getElementById(objId).innerHTML = "<p class=\"collection-loading\">Loading ...</p>";
}

function loadMainWell(request,objId){
	var htmlCon = request.responseText;
	document.getElementById(objId).innerHTML = "";	
	document.getElementById(objId).innerHTML = htmlCon;
	SNI.Common.RecipeCollections.hoverCity();
}