
function initFraudWarning() {
	var container = document.getElementById('fraudwarning');
	container.style.marginBottom = "10px";

	var s;
	s = '<div style="border:5px #a12353 solid; padding:5px;">';
	
	s += '<table><tr><td style="padding-left:30px; text-align:center;"><img src="/static/fraudwarning/WMSPC_RGB.jpg"><br><img src="/static/fraudwarning/alert-notepad.jpg"></td>';
	s += '<td style="padding-left:40px; padding-top:10px;">';
	
	s += '<div style="color:#a12353; font-size:16px; margin-bottom:20px;">';
	s += '<b>Important Announcement to WorldMark Owners</b>';
	s += '</div>';

	s += '<div style="color:#666666; font-size:12px; padding-right:200px;">';
	s += '<p>Wyndham Vacation Resorts Asia Pacific has received an increasing number of reports of unsolicited calls to WorldMark South Pacific Club Owners from companies such as National Vacation Sales and Service and Premier Market Solutions asking for credit card details.</p>';
	s += '<p>We recommend extreme caution in providing your credit card details to any of these entities.</p>';
	s += '<p>Click <a style="font-weight:normal;font-size:12px; " href="/ownerwarning">here</a> to read this important message on how to protect yourself.</p>';
	s += '</div>';

	s += '<div style="text-align:right">';
	s += '<a href="#" onclick="hideWarning();">Hide this warning</a>';
	s += '</div>';

	s += '</td></tr></table>';
	s += "</div>";
	container.innerHTML = s;
}

function hideWarning() {
	var containertr = document.getElementById('fraudwarningtr');
	containertr.style.display = 'none';
	makeRequest('/static/fraudwarning/ajax.php');
}

function makeRequest(url) {

  if (window.XMLHttpRequest) { // Mozilla, Safari, IE7...
      http_request = new XMLHttpRequest();
  } else if (window.ActiveXObject) { // IE6 and older
      http_request = new ActiveXObject("Microsoft.XMLHTTP");
  }
  http_request.open('GET', url, true);
  http_request.send(null);
} 