<!--

function si(o,url) {
	o.src=url;
}

function sbtn(o, name, descr) {
	var state = arguments.length == 3 ? "on" : "off";
	var descr = arguments.length == 3 ? o.getAttribute("alt") : "";
	o.src = "img/bt_"+name+"_"+state+".gif";
	document.getElementById("descrSnelbuttons").value = descr;
}



function deletePreview(bHasPreview, nSiteId, nId, nCtId ){
	if( bHasPreview == 'True') {
		var sNewLoc = '/includes/wrbc/xt_deletepreview.asp?siteid=' + nSiteId + '&id=' + nId + '&ctId=' + nCtId;
		var win = window.open( sNewLoc );
		win.blur();
	}	
}



function enablesubMenu(nId){
	try	{		
		top.frames.fraMenu.SetMenuOn(nId);
	}
	catch(e){
		setTimeout( "enablesubMenu("+ nId + ")",500 );
	}
}

function doPrint() {
	printwin = window.open('printwindow.htm', 'printwin','width=635,height=350,toolbar=1,top=40,left=40')
	printwin.focus()
//	if (document.getElementById!= null) 
//	{ 
//		var html = '<HTML>\n<HEAD>\n'; 
//		if (document.getElementsByTagName!= null) { 
//			var headTags = document.getElementsByTagName("head"); 
//			if (headTags.length > 0) 
//				html += headTags[0].innerHTML; 
//		} 
//		html += '\n</HE' + 'AD>\n<BODY>\n'; 
//		var printPageElem = document.getElementById("divprint"); 
//		if (printPageElem!= null) { 
//			html += printPageElem.innerHTML; 
//		} 
//		else { 
//			return; 
//		} 
//		html += '\n</BO' + 'DY>\n</HT' + 'ML>'; 
//		var printWin = window.open("","printFriendly"); 
//		printWin.blur();
//		printWin.document.open(); 
//		printWin.document.write(html); 
//		printWin.document.close(); 
//		printWin.print(); 
//	}
} 


function popUpFoto(URL) {
		var	W = 500;
		var H = 500;
		var L = (screen.width - W) / 5;
		var T = (screen.height - H) / 5;
		day = new Date();
		id = day.getTime();
		var sRef = "popup.asp?img=" + URL;
		eval("page" + id + " = window.open(sRef, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+W+',height='+H+',left ='+L+',top ='+T+'');");
	}



function CheckFile(strFile) 
{
	var blnOk = true;
	var strCheck = 'abcdefghijklmnopqrstuvwxyz0123456789_-';
			
	if (strFile == '') return true;
	while (strFile.indexOf("\\") != -1)
		strFile = strFile.slice(strFile.indexOf("\\") + 1);
	
		ext = strFile.slice(strFile.indexOf(".")).toLowerCase();
		
		if(ext != '.doc' && ext != '.pdf')
		{
			alert('U kunt alleen bestanden van het type: .doc en .pdf meesturen.');
			return false;
		}
		else
		{
			strFile = strFile.slice(0, strFile.indexOf(".")).toLowerCase();
			
			for(intTeller=0;intTeller<strFile.length;intTeller++)
			{
				if(strCheck.indexOf(strFile.charAt(intTeller)) >= 0)
				{
					blnOk = blnOk && true;
				}
				else
				{
					blnOk = blnOk && false;
				}
			}
			
			if(blnOk)
			{
				return true;
			}
			else
			{
				alert('De bestandsnaam mag alleen uit cijfers en letters bestaan.');
				return false;		
			}
		}
}



//-->