function open_Utopis(url) {
	var pos_y = (screen.width - 640) / 2;
	var pos_x = (screen.height - 480) / 2;
	win_popup = 'width=640,height=480,left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,titlebar=0'
	win = window.open(url, 'p_utopis', win_popup)
}

function openBestek(p_url) {
	var pos_y = (screen.width - 640) / 2;
	var pos_x = (screen.height - 480) / 2;
	win_popup = 'width=800,height=600,left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,titlebar=0'
	win = window.open(p_url, 'p_bestek', win_popup)
}

function openpageid(link_id) {
	window.location = 'index.asp?id='+link_id;
}

function openpage(page) {
	window.location=page;
}

function openPopup(p_width, p_height, p_name, p_url, p_scroll) {
	var pos_y = (screen.width - p_width) / 2;
	var pos_x = (screen.height - p_height) / 2;
	win_popup = 'width='+p_width+',height='+p_height+',left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars='+p_scroll+',titlebar=0'
	win = window.open(p_url, p_name, win_popup)
}

function startBestek() {
	var pos_y = (screen.width - 640) / 2;
	var pos_x = (screen.height - 480) / 2;
	var p_url = "http://www.bestekschrijven.nl/cws/c5launch.dll/ipsnet.exe.0?refr=website?dirn=Wedeflex?skel=Wedeflex2009";
	win_popup = 'width=875,height=650,left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,titlebar=0'
	win = window.open(p_url, 'p_bestek', win_popup)
}

function startBestekFC(fruit_code) {
	var pos_y = (screen.width - 640) / 2;
	var pos_x = (screen.height - 480) / 2;
	var p_url = "http://www.bestekschrijven.nl/cws/c5launch.dll/ipsnet.exe.0?refr=website?dirn=Wedeflex?skel=Wedeflex2009?"+fruit_code;
	//alert(p_url);
	win_popup = 'width=875,height=650,left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,titlebar=0'
	win = window.open(p_url, 'p_bestek', win_popup)
}

function startBestekCAD() {
	var pos_y = (screen.width - 640) / 2;
	var pos_x = (screen.height - 480) / 2;
	//var p_url = "http://www.bestekschrijven.nl/cws/c5launch.dll/ipsnet.exe.0?refr=website?dirn=Wedeflex?skel=Wedeflex2009?VRZK=VR03?FTCD=??????~~~~~~~~D";
	var p_url = "http://www.bestekschrijven.nl/cws/c5launch.dll/ipsnet.exe.0?refr=website?dirn=Wedeflex?skel=Wedeflex2009?VVRG=BV";
	win_popup = 'width=875,height=650,left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,titlebar=0'
	win = window.open(p_url, 'p_bestek', win_popup)
}

function startBestekVeiligh() {
	var pos_y = (screen.width - 640) / 2;
	var pos_x = (screen.height - 480) / 2;
	var p_url = "http://www.bestekschrijven.nl/cws/c5launch.dll/ipsnet.exe.0?refr=website?dirn=Wedeflex?skel=Wedeflex2009?FTCD=Z";
	win_popup = 'width=875,height=650,left='+pos_y+',top='+pos_x+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,titlebar=0'
	win = window.open(p_url, 'p_bestek', win_popup)
}

function openDaktuin(d_type) {
//alert("");
	if (d_type == 1) {
		startBestekFC('VRZK=WD?FTCD=C??????~~~~~~~Q');
		hideDaktuinDialog();
	}
	if (d_type == 2) {
		startBestekFC('VRZK=WD?FTCD=D??????~~~~~~~Q');
		hideDaktuinDialog();
	}
	if (d_type == 3) {
		startBestekFC('VRZK=WD?FTCD=E??????~~~~~~~Q');
		hideDaktuinDialog();
	}
}

function showDaktuinDialog() {
	document.getElementById('imgmap').className = 'opacity';
	document.getElementById('div-window').className = 'div-daktuin';
}

function hideDaktuinDialog() {
	document.getElementById('imgmap').className = 'show';
	document.getElementById('div-window').className = 'div-daktuin-hidden';
}

function switchRef(img_id, img_name) {
	var cur_img = document.getElementById(img_id).src.replace('http://www.wedeflex.nl/images/referenties/','');
	if (cur_img != img_name) {
		document.getElementById(img_id).src = 'images/referenties/t_'+img_name;
	}
}

function openRefPics(subcat_id) {
	openPopup(600, 530, 'pop_refpics', 'referenties_popup.asp?refid='+subcat_id, 0);
}

function openRefIU(ref_id) {
	openPopup(720, 565, 'pop_refpics_iu', 'referenties_iu_popup.asp?refid='+ref_id, 0);
}

/* FUNCTIES VOOR DOCUMENTATIE DOWNLOADEN */
function verifyData() {
	var _datavalid = 1
		if (_datavalid == 1) {
			document.frmRegister.submit();
		}else{
			alert('invalid data entered!');
		}
}

function switchDoc(img_id, img_name) {
	//alert(document.getElementById(img_id).src);
	var cur_img = document.getElementById(img_id).src.replace('http://www.wedeflex.nl/images/downloads/','');
	if (cur_img != img_name) {
		document.getElementById(img_id).src = 'images/downloads/'+img_name;
	}
}

function setTarget(target_id) {
	document.getElementById("if_dl").src = 'file_download.asp?file='+target_id;
}