function startdisplay() {
	cookieValue = GetCookie('saved_'+contractFormName);
	if(cookieValue != null){
		var cookieArray = cookieValue.split("@");
		getFormObject(contractFormName, "p_s_PARA2").value = cookieArray[0];
	}
}

function bookmark(){
	window.external.AddFavorite(window.location.href,window.document.title);
}

function submitForm() {
	getFormObject("hiddenform", "variablestring").value = "p_s_PARA2=" + escapeChars(getFormObject(contractFormName, "p_s_PARA2").value) + "&";
	getObject("hiddenform").submit();
}
function adjustIFrameSize (iframeWindow) {
  if (iframeWindow.document.height) {
    var iframeElement = parent.document.getElementById(iframeWindow.name);
    iframeElement.style.height = iframeWindow.document.height + 100 + 'px';
    iframeElement.style.width = '100%';
  }
  else if (document.all) {
    var iframeElement = parent.document.all[iframeWindow.name];
    if (iframeWindow.document.compatMode &&
        iframeWindow.document.compatMode != 'BackCompat') 
    {
      iframeElement.style.height = iframeWindow.document.documentElement.scrollHeight + 5 + 'px';
      iframeElement.style.width = '100%';
    }
    else {
      iframeElement.style.height = iframeWindow.document.body.scrollHeight + 5 + 'px';
      iframeElement.style.width = '100%';
    }
  }
}
function goBack() {
	parent.location = "/contracts/tradesimple/";
}
function clearMessage() {
	if (document.all) {
    var waiting = parent.document.all["waiting"];
	} else {
    var waiting = parent.document.getElementById("waiting");
	}
	if (waiting != null) waiting.innerHTML = "";
}
function redirectToViewResults() {
	cookieValue = GetCookie('saved_'+contractFormName);
	if(cookieValue != null){
		var cookieArray = cookieValue.split("@");
		getFormObject(contractFormName, "p_s_PARA2").value = cookieArray[0];
	}
	getObject(contractFormName).submit();
}
