var current_base = '';
var current_page = '';
var form_adress_revalidate_postcode = '';
var form_adress_revalidate_huisnummer = '';
function form_adress_revalidate(id) {
var postcode = document.getElementById(id + '_postcode');
var huisnummer = document.getElementById(id + '_huisnummer');
var straat = document.getElementById(id + '_straat');
var plaats = document.getElementById(id + '_plaats');
if(
form_adress_revalidate_postcode != postcode.value ||
form_adress_revalidate_huisnummer != huisnummer.value
) {
if(postcode.value > '' && huisnummer.value > '') {
var validator = new rpcValidator(rpcServer);
var res = validator.getPostalAddress('nl',postcode.value,huisnummer.value);
if(res.status == 1) {
straat.value = res.street;
plaats.value = res.city;
} else {
straat.value = 'onbekend';
plaats.value = '';
}
form_adress_revalidate_postcode = postcode.value;
form_adress_revalidate_huisnummer = huisnummer.value;
}
}
}
var acrobatVersion = 0;
var flashVersion = 0;
var quicktimeVersion = 0;
function getAcrobatVersion() {
var agent = navigator.userAgent.toLowerCase();
// NS3+, Opera3+, IE5+ Mac, Safari (support plugin array): check for Acrobat plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
for (i=0; i < navigator.plugins.length; i++ ) {
var plugin = navigator.plugins[i];
if (plugin.name.indexOf("Adobe Acrobat") > -1) {
if(isNaN(parseFloat(plugin.name.substring(30)))) {
acrobatVersion = '>=8';
} else {
acrobatVersion = parseFloat(plugin.name.substring(30));
}
}
}
}
// IE4+ Win32: attempt to create an ActiveX object using VBScript
else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
document.write(' \n');
document.write('on error resume next \n');
document.write('dim obAcrobat \n');
document.write('set obAcrobat = CreateObject("PDF.PdfCtrl.5") \n');
document.write('if IsObject(obAcrobat) then \n');
document.write('acrobatVersion = 5 \n');
document.write('else set obAcrobat = CreateObject("PDF.PdfCtrl.1") end if \n');
document.write('if acrobatVersion < 5 and IsObject(obAcrobat) then \n');
document.write('acrobatVersion = 4 \n');
document.write('end if');
document.write(' \n');
}
// Can't detect in all other cases
else {
acrobatVersion = -1;
}
return acrobatVersion;
}
function getFlashVersion() {
var latestFlashVersion = 9;
var agent = navigator.userAgent.toLowerCase();
// NS3 needs flashVersion to be a local variable
if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
flashVersion = 0;
}
// NS3+, Opera3+, IE5+ Mac (support plugin array): check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
var flashPlugin = navigator.plugins['Shockwave Flash'];
if (typeof flashPlugin == 'object') {
for (var i = latestFlashVersion; i >= 3; i--) {
if (flashPlugin.description.indexOf(i + '.') != -1) {
flashVersion = i;
break;
}
}
}
}
// IE4+ Win32: attempt to create an ActiveX object using VBScript
else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
var doc = ' \n';
doc += 'On Error Resume Next \n';
doc += 'Dim obFlash \n';
doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
doc += ' Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
doc += ' If IsObject(obFlash) Then \n';
doc += ' flashVersion = i \n';
doc += ' Exit For \n';
doc += ' End If \n';
doc += 'Next \n';
doc += ' \n';
document.write(doc);
}
// WebTV 2.5 supports flash 3
else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
// older WebTV supports flash 2
else if (agent.indexOf("webtv") != -1) flashVersion = 2;
// Can't detect in all other cases
else {
flashVersion = -1;
}
return flashVersion;
}
function getQuicktimeVersion() {
var agent = navigator.userAgent.toLowerCase();
// NS3+, Opera3+, IE5+ Mac (support plugin array): check for Quicktime plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
for (i=0; i < navigator.plugins.length; i++ ) {
var plugin =navigator.plugins[i];
if (plugin.name.indexOf("QuickTime") > -1) {
quicktimeVersion = parseFloat(plugin.name.substring(18));
}
}
}
// IE4+ Win32: attempt to create an ActiveX object using VBScript
else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
document.write(' \n');
document.write('on error resume next \n');
document.write('dim obQuicktime \n');
document.write('set obQuicktime = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") \n');
document.write('if IsObject(obQuicktime) then \n');
document.write(' if obQuicktime.IsQuickTimeAvailable(0) then \n');
document.write(' quicktimeVersion = CInt(Hex(obQuicktime.QuickTimeVersion) / 1000000) \n');
document.write(' end if \n');
document.write('end if \n');
document.write(' \n');
}
// Can't detect in all other cases
else {
quicktimeVersion = -1;
}
return quicktimeVersion;
}
function getDetectorPars() {
function val(v) {
if(typeof(v) == "undefined" || v == null) {
return '';
} else {
v = String(v);
return v;
}
}
function boolval(v) {
if(typeof(v) == "undefined") {
return '-1';
} else {
if(v) {
return '1';
} else {
return '0';
}
}
}
var pars =
"RND="+Math.floor(1000+Math.random()*8999)+
"&V=A" +
"&SID=49f072bded23ba7757e6b73989154c1f" +
"&DEF=" + escape(
val(screen.width) + "|" +
val(screen.height) + "|" +
val(screen.colorDepth) + "|" +
val(navigator.appName) + "|" +
val(navigator.appCodeName) + "|" +
val(navigator.appVersion) + "|" +
val(navigator.appMinorVersion) + "|" +
val(acrobatVersion) + "|" +
val(flashVersion) + "|" +
val(quicktimeVersion) + "|" +
boolval(navigator.cookieEnabled) + "|" +
val(navigator.cpuClass) + "|" +
val(navigator.platform) + "|" +
val(navigator.userLanguage) + "|" +
val(navigator.systemLanguage)
);
return pars;
}
/*
var tabs = Array('home', 'contact', 'bestelpagina', 'klantenservice', 'maatwerk', 'voorwaarden', 'sitemap');
function activeTab(tab) {
for(i = 0; i < tabs.length ; i++) {
if(tab == tabs[i]) {
state = "o";
$("#content").load(current_base+"/pre.php", {method: 'ajax', page: tab});
} else {
state = "e";
}
$("#b_"+tabs[i]).attr("src",current_base+"/img/b_"+tabs[i]+"_"+state+".png");
}
}
function activePage(page) {
$("#content").load(current_base+"/pre.php", {method: 'ajax', page: page});
}
$(document).ready(function() {
$("#b_home").click(
function() {
activeTab('home');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
$("#b_contact").click(
function() {
activeTab('contact');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
$("#b_bestelpagina").click(
function() {
activeTab('bestelpagina');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
$("#b_klantenservice").click(
function() {
activeTab('klantenservice');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
$("#b_maatwerk").click(
function() {
activeTab('maatwerk');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
$("#b_voorwaarden").click(
function() {
activeTab('voorwaarden');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
$("#b_sitemap").click(
function() {
activeTab('sitemap');
$("#content").show();
$("#mijnpagina").hide();
$("#actiepagina").hide();
$("#actiepagina2").hide();
return false;
}
);
if(current_page == '') {
activeTab('home');
}
$("#logon").click(
function() {
$("#actiepagina").hide();
$("#actiepagina2").hide();
$("#mijnpagina").animate({
height: 'show',
opacity: 'show'
}, 'slow');
return false;
}
);
$("#faq_treeview").treeview({
collapsed: true
});
$('#onderhoud').scrollFollow({
speed: 250,
offset: 100
});
});
*/
// JavaScript Document
function objHide(id) {
o = document.getElementById(id);
if(o) {
s = o.style;
s.display = 'none';
}
}
function objShow(id) {
o = document.getElementById(id);
if(o) {
s = o.style;
s.display = 'block';
}
}
function objOpacity(id, opacity) {
var o = document.getElementById(id);
if(o) {
o.style.opacity = (opacity / 100);
o.style.MozOpacity = (opacity / 100);
o.style.KhtmlOpacity = (opacity / 100);
o.style.filter = "alpha(opacity=" + opacity + ")";
}
return false;
}
function setImg(id, src) {
o = document.getElementById(id);
if(o) {
o.src = src;
}
}
function divToggle(id) {
o = document.getElementById('toggle_'+id);
if(o) {
if(o.src.indexOf('img/hide.png') != -1) {
o.src = current_base+'/img/show.png';
state = 'hide';
} else {
o.src = current_base+'/img/hide.png';
state = 'show';
}
}
o = document.getElementById('cluster_'+id);
if(o) {
s = o.style;
if(state == 'hide') {
s.display = 'none';
} else {
s.display = 'block';
}
}
this.blur();
return false;
}
function urlOpen(url) {
window.open(url);
return false;
}
var autoFlip_id = -1;
var autoFlip_min = -1;
var autoFlip_max = -1;
var autoFlip_current = -1;
var autoFlip_next = -1;
var autoFlip_delay = -1;
function autoFlip(afBase, afMin, afMax, afDelay) {
// reentry? stop the timer!
if(autoFlip_id > -1) {
clearTimeout(autoFlip_id);
}
if(autoFlip_current == -1) {
autoFlip_base = afBase;
autoFlip_min = afMin;
autoFlip_max = afMax;
autoFlip_current = afMin;
autoFlip_next = autoFlip_current + 1;
if(autoFlip_next > autoFlip_max) {
autoFlip_next = autoFlip_min;
}
autoFlip_delay = afDelay;
} else {
autoFlip_next = autoFlip_current + 1;
if(autoFlip_next > autoFlip_max) {
autoFlip_next = autoFlip_min;
}
}
// make sure all is disabled, and only current and next are visible
for(i = autoFlip_min ; i <= autoFlip_max; i++) {
o = document.getElementById(autoFlip_base + i);
if(o) {
if(!(i == autoFlip_next)) {
objOpacity(autoFlip_base + i, 0);
}
}
}
objOpacity(autoFlip_base + autoFlip_current, 100);
objOpacity(autoFlip_base + autoFlip_next, 0);
//alert('current:'+autoFlip_current+',next:'+autoFlip_next);
timer = 0;
speed = 100;
smoothness = 75;
for(i = 0; i <= smoothness; i++) {
setTimeout("objOpacity('" + autoFlip_base + autoFlip_current + "'," + (100-(100/smoothness)*i) + ")",(timer * speed));
setTimeout("objOpacity('" + autoFlip_base + autoFlip_next + "'," + (100/smoothness)*i + ")",(timer * speed));
timer++;
}
autoFlip_current = autoFlip_next;
autoFlip_id = setTimeout("autoFlip('"+afBase+"', "+afMin+", "+afMax+", "+afDelay+")", afDelay);
}
function autoFlipX(afBase, afMin, afMax, afDelay) {
// reentry? stop the timer!
if(autoFlip_id > -1) {
clearTimeout(autoFlip_id);
}
if(autoFlip_current == -1) {
autoFlip_base = afBase;
autoFlip_min = afMin;
autoFlip_max = afMax;
autoFlip_current = afMin;
autoFlip_delay = afDelay;
} else {
autoFlip_current++;
if(autoFlip_current > autoFlip_max) {
autoFlip_current = autoFlip_min;
}
}
// show only current
for(i = autoFlip_min ; i <= autoFlip_max; i++) {
o = document.getElementById(autoFlip_base + i);
if(o) {
if(i == autoFlip_current) {
o.style.display = 'block';
} else {
o.style.display = 'none';
}
}
}
autoFlip_id = setTimeout("autoFlip('"+afBase+"', "+afMin+", "+afMax+", "+afDelay+")", afDelay);
}
// zoom voor afbeeldingen
function imgZoom(id, url) {
var o = document.getElementById('zoom');
if(o) {
o.style.display = 'block';
o.innerHTML =
""+
"
"+
"";
}
return false;
}
function imgZoomExit() {
var o = document.getElementById('zoom');
if(o) {
o.style.display = 'none';
}
return false;
}
function imgOfferte(id, url) {
var o = document.getElementById(id);
if(o) {
o.style.display = 'block';
o.src = current_base+url;
}
return false;
}