function showDeleteConfirmation(itemType, itemNumber) {
	showPopWin('/deleteConfirmation.htm?itemType='+itemType+'&itemNumber='+itemNumber, 400, 150, refreshPage);
}

function showContactDeleteConfirmation(contactName, profileId) {
	showPopWin('/contactDeleteConfirmation.htm?fullName='+contactName+'&profileId='+profileId, 400, 150, refreshPage);
}

function showProfilePositionDialog(positionId, suffix) {
	var url = '/networkPositionDialog.htm?positionId=' + positionId;
	if (suffix != null && suffix != ""){
		url = url + "&" + suffix;
	}
	showPopWin(url, 530, 540, refreshPage);	
}

function showSummaryPopUp(){
	window.top.showPopWin('/networkMyProfileSummary.htm', 538, 457, refreshPage);
}

function showAddPhotoPopUp(photoPath, profileId){
	
	var addToLink = "";
	if (profileId!=null && profileId > -1)
		addToLink = "?profileId=" + profileId;
	
	if(photoPath=="")
		window.top.showPopWin('/networkAddPhoto.htm' + addToLink, 538, 225, refreshPage);
	else
		window.top.showPopWin('/networkAddPhoto.htm' + addToLink, 538, 465, refreshPage);
}

function showProfileEducation(educationId){
	if (educationId != null)
		window.top.showPopWin('/networkProfileEducation.htm?educationId='+educationId, 530, 300, refreshPage);
	else
		window.top.showPopWin('/networkProfileEducation.htm', 530, 300, refreshPage);
}

function showAddWebSite(id){
	window.top.showPopWin('/networkAddWebSite.htm?id='+id, 538, 279, refreshPage);
}


function submitPhotoPage(action)
{
	document.getElementById("action").value = action;
	document.getElementById("photoForm").submit();
	//window.top.location = "networkProfilePage.htm";
}

function submitEducationPage()
{
	document.getElementById("educationForm").submit();
}

function clickHeaderSearchTextField()
{	
	var textField = document.getElementById("keywordsForSearchUnique");
	if (textField != null)
	{
		if (textField.value == "Naam, organisatie, trefwoord")
		{
			textField.value = "";
			textField.style.color = "#000000";
		}
	}
}

function fillHeaderSearch()
{
	var path = window.top.location.href;
	
	if (path.indexOf("network") !=-1){
		var combo = document.getElementById("headerSearchCombo");
		if (combo != null){
			combo.selectedIndex = 2;
			/*
			var textField = document.getElementById("keywordsForSearchUnique");
			textField.value = "Naam, organisatie, trefwoord";
			textField.style.color = "#808080";
			*/
		}else{
			combo.selectedIndex = 0;
			//textField.style.color = "#000000";
		}
	}
}

function showReactionBoxIfNotExpiredNetwork(){
	UserDWR.hasAuthenticationExpiredForKnownUser({
		callback:function(expired) {showReactionBoxIfNotExpiredCallbackNetwork(expired);} 
	});
}

function showReactionBoxIfNotExpiredCallbackNetwork(expired){
	if (expired){
		showLoginForReaction();
	}else{
		return showCommentFormNetwork('reageerDiv', 123);
	}
}

function showCommentFormNetwork(divId, contentItemId) {
	document.getElementById("news_vertical_menu_container").style.height = null;
	var leftColumnHeight = document.getElementById("networkNewsLeftColumnId").style.height;
	if (leftColumnHeight != null){
		leftColumnHeight = leftColumnHeight.substring(0, leftColumnHeight.length-2);
		leftColumnHeight = parseInt(leftColumnHeight);
	}
	document.getElementById("news_center_column").style.height = null;
	document.getElementById("news_right_column").style.height = null;
	if ( $(divId+"_"+contentItemId).visible() ) {
		document.getElementById("networkNewsLeftColumnId").style.height = (leftColumnHeight - 200) + "px";
		$(divId+"_"+contentItemId).toggle();
	} else {
		$("reageerDiv_123").hide();
		clearCommentForm(123);
		document.getElementById("networkNewsLeftColumnId").style.height = (leftColumnHeight + 200) + "px";
		$(divId + "_" + contentItemId).show();
	}
	adjustSizes();
	return false;		
}

function showDossierExplanation() {
	window.top.showPopWin('/dossierExplanation.htm', 538, 279, null);
}