var divId = "";
function checkCookie(id) {
	//document.cookie = "testCookie=yes; path=/products/";
	//alert(get_cookie("finishedForm"));
	divId = id;
	var cookieValue;
	if(get_cookie("finishedForm")) {
		cookieValue = get_cookie("finishedForm");
		if(cookieValue == "yes") { 
			MM_effectBlind(divId, 1000, '0%', '100%', true);
		}
	
	}
	else {
		//alert(divId);
		var anchorName = "";
		switch(divId) {
			case "more-user-friendly-interface":
			  anchorName = "#1";
			  break;    
			case "more-flexible":
			  anchorName = "#2"; 
			  break;
			case "efficient-processing":
			  anchorName = "#3";
			  break;    
			case "vendor-outsourcing":
			  anchorName = "#4"; 
			  break;
			case "standardized-gateway":
			  anchorName = "#5";
			  break;    
			case "background-ordering":
			  anchorName = "#6"; 
			  break;
			case "custom-report":
			  anchorName = "#7";
			  break;    
			case "reliable-secure":
			  anchorName = "#8"; 
			  break;
			case "client-invoicing":
			  anchorName = "#9"; 
			  break;    
			case "quickapp":
			  anchorName = "#10"; 
			  break;
			case "tenant-scorecard":
			  anchorName = "#13"; 
			  break;    
			default:
			  anchorName = "";		
		}
		 document.cookie = "destinationName=" + anchorName + "; path=/";
		 document.cookie = "destinationDiv=" + divId + "; path=/";
		 this.location.href = "/product-form/";
	}
	

	
	//MM_effectBlind('more-user-friendly-interface', 1000, '0%', '100%', true);
	
}

function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

function openDiv() {
		if(get_cookie("destinationDiv")) {
			cookieValue = get_cookie("destinationDiv");
			MM_effectBlind(cookieValue, 1000, '0%', '100%', false);
			document.cookie = "destinationDiv=; path=/";
		}
}