document.write('<script type="text/javascript" src="/sitemod/includes/javascript/json2.js"></script>');function SaveExtraFormData(formId,formData,saveSuccess,saveFail){var extraData=new Array();if(formData&&formData!=''){var dataSplit=formData.split('&');for(var i=0;i<dataSplit.length;i++){var data=dataSplit[i];var firstIndex=data.indexOf(';');var secondIndex=data.indexOf('=');var data={ID:data.substring(0,firstIndex),Text:data.substring(firstIndex+1,secondIndex),Value:data.substring(secondIndex+1,data.length)}
extraData[i]=data;}}
var data={"formId":formId,"extraData":extraData};var json=JSON.stringify(data);$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"/sitemod/modules/form/webservices/formdatareceiver.asmx/SaveExtraFormData",data:json,dataType:"json",success:function(msg){if(saveSuccess)
saveSuccess();},error:function(XMLHttpRequest,textStatus,errorThrown){if(saveFail)
saveFail();}});}
function OpenForm(formId,formExtraData,width,height){var formWindow;var formWindowUrl;var formWindowWidth=850;var formWindowHeight=900;if(width)
formWindowWidth=width;if(height)
formWindowHeight=height;formWindow=window.open('/sitemod/modules/form/loadingpage.aspx?formid='+formId,'form','width='+formWindowWidth+',height='+formWindowHeight+',resizable=yes,scrollbars=yes');if(!formWindow)
{formWindow=window.open();formWindow.location.href='/sitemod/modules/form/loadingpage.aspx?formid='+formId;}
SaveExtraFormData(formId,formExtraData,function(){formWindow.location='/sitemod/modules/form/default.aspx?formid='+formId+'&loadextradata=1';},function(){formWindow.location='/sitemod/modules/form/default.aspx?formid='+formId+'&loadextradata=1';});}
function SubmitForm(formId,formData,publicMailReceiver,adminMailReceiver,changedSubject,isCustomer){$("#SecureFormDataReceiverIframe").remove();var protocol="https://";if(document.location.host.indexOf("dev.nordea.com")>-1||document.location.host.indexOf("test.nordea.com")>-1){protocol="http://";}
var url=protocol+document.location.host+"/sitemod/modules/form/webservices/secureformdatareceiver.ashx?requesttype=submitform&formid="+formId+"&formdata="+encodeURIComponent(formData);if(publicMailReceiver)
url+="&publicmailreceiver="+publicMailReceiver;if(adminMailReceiver)
url+="&adminmailreceiver="+adminMailReceiver;if(changedSubject)
url+="&changedsubject="+changedSubject;url+="&iscustomer="+isCustomer;$("body").append('<iframe id="SecureFormDataReceiverIframe" src="'+url+'" style="display:none;"></iframe>');}