var SupplyManagementCongressBackgroundImage = 1;
function openSite(URLStr) {
var maxx = screen.width;
var maxy = screen.height;
windowprops = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=100,height=100,left=100,top=100";
window.open(URLStr+"&maxx="+maxx+"&maxy="+maxy,"",windowprops);
}
function supersize(a_iBetween, a_iTransition) {
scaleImages();
setTimeout('backgroundfade(1, ' + a_iBetween + ', ' + a_iTransition + ')', a_iBetween - a_iTransition);
}
function scaleImages() {
var iImage = 1;
var oBackground = document.getElementById('background');
var oFixed = document.getElementById('fixwindow');
oBackground.style.height = jQuery(window).height();
oBackground.style.width = jQuery(window).width();
oFixed.style.height = jQuery(window).height();
oFixed.style.width = jQuery(window).width();
do {
var oImg = document.getElementById('background-image' + iImage);
if (oImg) {
oImg.style.height = jQuery(window).height() + "px";
oImg.style.width = 'auto';
if (oImg.width < jQuery(window).width()) {
oImg.style.width = jQuery(window).width() + "px";
oImg.style.height = 'auto';
}
}
iImage++;
} while (oImg);
}
function backgroundfade(a_iImage, a_iBetween, a_iTransition) {
var iNextImage = a_iImage + 1;
var oNextImage = document.getElementById('background-image' + iNextImage);
if (!oNextImage) {
if (a_iImage == 1) return;
iNextImage = 1;
}
jQuery('#background-image' + a_iImage).fadeOut(a_iTransition, 'linear');
jQuery('#background-image' + iNextImage).fadeIn(a_iTransition, 'linear');
setTimeout('backgroundfade(' + iNextImage + ', ' + a_iBetween + ', ' + a_iTransition + ')', a_iBetween);
}
function bShowHideFormError(a_sId) {
var oErrorRow = document.getElementById(a_sId + "__errorRow");
var sDisplay = 'none';
if (oErrorRow.cells[0].childNodes[0].style.display == 'none') sDisplay = 'block';
for (var iCell = 0; iCell < oErrorRow.cells.length; iCell++) {
if (oErrorRow.cells[iCell].childNodes[0].nodeType != 3) oErrorRow.cells[iCell].childNodes[0].style.display = sDisplay;
}}
function CpFormInputHint_Focus(a_sId, a_sHintColor, a_sTextColor) {
var sStandard = document.getElementById(a_sId + '_sText').value;
var oField = document.getElementById(a_sId);
var sChanged = document.getElementById(a_sId + '_bChanged').value;
if (sChanged == '0') {
oField.value = '';
vHintChanged(a_sId, a_sHintColor, a_sTextColor);
}}
function CpFormInputHint_Blur(a_sId, a_sHintColor, a_sTextColor) {
var sStandard = document.getElementById(a_sId + '_sText').value;
var oField = document.getElementById(a_sId);
var sChanged = document.getElementById(a_sId + '_bChanged').value;
if (oField.value == "") {
vHintReset(a_sId, a_sHintColor, a_sTextColor);
}}
function vHintReset(a_sId, a_sHintColor, a_sTextColor) {
var sStandard = document.getElementById(a_sId + '_sText').value;
var oField = document.getElementById(a_sId);
var sChanged = document.getElementById(a_sId + '_bChanged').value;
oField.value = sStandard;
oField.style.color = a_sHintColor;
document.getElementById(a_sId + '_bChanged').value = '0';
}
function vHintChanged(a_sId, a_sHintColor, a_sTextColor) {
var sStandard = document.getElementById(a_sId + '_sText').value;
var oField = document.getElementById(a_sId);
var sChanged = document.getElementById(a_sId + '_bChanged').value;
oField.style.color = a_sTextColor;
document.getElementById(a_sId + '_bChanged').value = '1';
}
function bIsNull(a_uVar) {
"use strict";
return (a_uVar === null);
}
function bIsBoolean(a_uVar) {
"use strict";
if (bIsNull(a_uVar)) {
return false;
} else {
return (typeof (a_uVar) === "boolean");
}
}
function bIsString(a_uVar) {
"use strict";
if (bIsNull(a_uVar)) {
return false;
} else {
return (typeof (a_uVar) === "string");
}
}
function bIsDefined(a_uVar) {
"use strict";
return (typeof (a_uVar) !== "undefined");
}
function bIsFunction(a_uVar) {
"use strict";
if (bIsNull(a_uVar)) {
return false;
} else {
return (typeof (a_uVar) === "function");
}
}
function bIsObject(a_uVar) {
"use strict";
if (bIsNull(a_uVar)) {
return false;
} else {
return (typeof (a_uVar) === "object");
}
}
function sURLEncode(a_sText, a_bSaveRes, a_bToSpecialHTMLEntities) {
var bSaveRes = (!bIsDefined(a_bSaveRes) ? true : a_bSaveRes);
var bToSpecialHTMLEntities = (!bIsDefined(a_bToSpecialHTMLEntities) ? false : a_bToSpecialHTMLEntities);
if (bToSpecialHTMLEntities) {
a_sText = a_sText.replace(/€/g, '&euro;');
}
a_sText = a_sText.replace(/%/g, '%25');
a_sText = a_sText.replace(/ /g, '%20');
a_sText = a_sText.replace(/"/g, '%22');
a_sText = a_sText.replace(/</g, '%3C');
a_sText = a_sText.replace(/>/g, '%3E');
a_sText = a_sText.replace(/#/g, '%23');
a_sText = a_sText.replace(/</g, '%3C');
a_sText = a_sText.replace(/{/g, '%7B');
a_sText = a_sText.replace(/}/g, '%7D');
a_sText = a_sText.replace(/\|/g, '%7C');
a_sText = a_sText.replace(/\\/g, '%5C');
a_sText = a_sText.replace(/\^/g, '%5E');
a_sText = a_sText.replace(/~/g, '%7E');
a_sText = a_sText.replace(/\[/g, '%5B');
a_sText = a_sText.replace(/\]/g, '%5D');
a_sText = a_sText.replace(/`/g, '%60');
a_sText = a_sText.replace(/\n/g, '%0A');
if (!bSaveRes) {
a_sText = a_sText.replace(/\$/g, '%24');
a_sText = a_sText.replace(/&/g, '%26');
a_sText = a_sText.replace(/\+/g, '%2B');
a_sText = a_sText.replace(/,/g, '%2C');
a_sText = a_sText.replace(/\//g, '%2F');
a_sText = a_sText.replace(/:/g, '%3A');
a_sText = a_sText.replace(/;/g, '%3B');
a_sText = a_sText.replace(/=/g, '%3D');
a_sText = a_sText.replace(/\?/g, '%3F');
a_sText = a_sText.replace(/@/g, '%40');
}
return a_sText;
}
var oSimpleAjaxRequestObject = new Object();
var aAjaxSimpleReceiveFunction = new Object();
var iAjaxSimpleRequestId = 10000;
function vSimpleAjaxSend(a_sURL, a_sPost, a_hReceiveFunction, a_sMimeType, a_iNr) {
var sMimeType = (a_sMimeType ? a_sMimeType : 'text/xml');
var iNr = (a_iNr ? a_iNr : 0);
try {
if (oSimpleAjaxRequestObject[iNr]) {
oSimpleAjaxRequestObject[iNr].abort();
}
oSimpleAjaxRequestObject[iNr] = new XMLHttpRequest();
if (oSimpleAjaxRequestObject[iNr].overrideMimeType) {
oSimpleAjaxRequestObject[iNr].overrideMimeType(sMimeType);
}
} catch (e) {
try
{
if (oSimpleAjaxRequestObject[iNr]) {
oSimpleAjaxRequestObject[iNr].abort();
}
oSimpleAjaxRequestObject[iNr] = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e)
{
try
{
if (oSimpleAjaxRequestObject[iNr]) {
oSimpleAjaxRequestObject[iNr].abort();
}
oSimpleAjaxRequestObject[iNr] = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e)
{
hErrorFunction(2, 3, "Deze browser ondersteunt geen Ajax");
return false;
}
}
}
aAjaxSimpleReceiveFunction[iNr] = a_hReceiveFunction;
oSimpleAjaxRequestObject[iNr].onreadystatechange = vSimpleAjaxProccesState;
protocolLength = a_sURL.indexOf(":") + 1;
if ( window.location.protocol.length != protocolLength )
{
a_sURL = window.location.protocol + a_sURL.substr(protocolLength);
}
oSimpleAjaxRequestObject[iNr].open('POST', a_sURL, true);
oSimpleAjaxRequestObject[iNr].setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
a_sPost = a_sPost + (a_sPost == '' ? '?' : '&' ) + 'iAjaxRequestId=' + iAjaxSimpleRequestId;
iAjaxSimpleRequestId++;
oSimpleAjaxRequestObject[iNr].send(sURLEncode(a_sPost));
return true;
}
function vSimpleAjaxProccesState() {
var iAjaxNr = -1;
for (var iNr in oSimpleAjaxRequestObject) {
if (oSimpleAjaxRequestObject.hasOwnProperty(iNr)) {
if (oSimpleAjaxRequestObject[iNr].readyState == 4) {
iAjaxNr = iNr;
break;
}
}
}
if (iAjaxNr < 0) return;
if (oSimpleAjaxRequestObject[iAjaxNr].status == 200) {
if (aAjaxSimpleReceiveFunction[iAjaxNr] !== null) aAjaxSimpleReceiveFunction[iAjaxNr](oSimpleAjaxRequestObject[iAjaxNr]);
} else {
if (oSimpleAjaxRequestObject[iAjaxNr].status > 0) hErrorFunction(0, 2, "Opdracht kon niet worden uitgevoerd. Status: " + oSimpleAjaxRequestObject[iAjaxNr].status + ", " + oSimpleAjaxRequestObject[iAjaxNr].responseText);
}
vSimpleAjaxClear(iAjaxNr);
}
function vSimpleAjaxClear(a_iNr) {
var iNr = (a_iNr ? a_iNr : 0);
delete oSimpleAjaxRequestObject[iNr];
delete aAjaxSimpleReceiveFunction[iNr];
}

