
var envSetting;
var serverSetting;
$(function() {
	var stringArray = $("#environmentsetting").attr("value").split("framework");
	var stringArray2 = $("#environmentsetting").attr("value").split("://");
	envSetting = stringArray[0];
	httpSetting = stringArray2[0];
	serverSetting = $("#serversetting").attr("value");
});



function getCookieValue (cookieName) {
  var exp = new RegExp (escape(cookieName) + "=([^;]+)");
  if (exp.test (document.cookie + ";")) {
    exp.exec (document.cookie + ";");
    return unescape(RegExp.$1);
  }
  else return false;
}
/* ----------------------------------------------------------------------------	
Set warning popups
*/
var WarningPopup = getCookieValue("MicrosoftStoreWarningPopup") 

function iniWarningPopup(){
	if(!WarningPopup || WarningPopup == 1 && httpSetting == "https" || WarningPopup == 2 && httpSetting == "http") { 
		document.getElementById('outer').style.visibility = "visible";
		document.getElementById('outer').style.display = "block";
	}

}

function CloseWarningPopup() {
	$('#outer').css('display', 'none');
	if(httpSetting == "http" && !WarningPopup) {
		document.cookie = ("MicrosoftStoreWarningPopup=1");
		}
	else if(httpSetting == "https" && !WarningPopup) {
		document.cookie = ("MicrosoftStoreWarningPopup=2");
		}
	else{
		document.cookie = ("MicrosoftStoreWarningPopup=3");
		}
}

$(document).ready(function(){
if($("body").hasClass("IE6")) {
	$(iniWarningPopup);
	}
});
