function SetTocTopOfPage(curHeadToc){
	var myHeadToc="headtoc_" + curHeadToc;
	if (document.all(myHeadToc)){
		var length=document.all(myHeadToc).all.tags("A").length;
		for (i=0; i<length; i++){
			var origValue=document.all(myHeadToc).all.tags("A").item(i).getAttribute("href");
				origValueArr=origValue.split("#");
				origValue="#" + origValueArr[1];
			var value="#";
			document.all(myHeadToc).all.tags("A").item(i).setAttribute("href", value);
		}
	}
}

function modifyToc(){
	if (document.all("H1_PageTOC")){
		var length=document.all("H1_PageTOC").all.tags("A").length;
		for (i=0; i<length; i++){
			var origValue=document.all("H1_PageTOC").all.tags("A").item(i).getAttribute("href");
				origValueArr=origValue.split("#");
				origValue="#" + origValueArr[1];
			var value="javascript:showH1Section('H1_section_" + i + "', '" + length + "', '" + origValue + "')";
			document.all("H1_PageTOC").all.tags("A").item(i).setAttribute("href", value);
		}
	}
}

function modifyPptToc(author,indate,owner){
var active=document.all("navButton").all.tags("A").item(0).name; 
var extra="?&dInDate=" + escape(indate) + "&xSiteOwner=" + escape(owner);  
var nrOfButtons=document.all("navButton").all.tags("A");  
nrOfButtons=nrOfButtons.length;
for (i=1; i<=nrOfButtons-1; i++){  
	var link=document.all("navButton").all.tags("A").item(i).getAttribute("href");  
	var linkArr=link.split("#");  
	link=linkArr[0] + extra;  
	document.all("navButton").all.tags("A").item(i).setAttribute("href", link);   
	var img=document.all("navButton").all.tags("A").item(i).innerHTML;   
	img=img.toUpperCase();  
	if (img.indexOf("GTABNXT.GIF")!=-1 || img.indexOf("NEXT")!=-1) 
		document.all("navButton").all.tags("A").item(i).innerHTML="<strong> >> </strong>";  
	if (img.indexOf("GTABPRV.GIF")!=-1 || img.indexOf("PREVIOUS")!=-1) 
		document.all("navButton").all.tags("A").item(i).innerHTML="<strong> << </strong>"; 
}  
var nrOfTocLinks=document.all("ppttextbar").all.tags("A");  
nrOfTocLinks=nrOfTocLinks.length;
var y=1; 
for (i=0; i<=nrOfTocLinks-1; i++){   
	document.all("ppttextbar").all.tags("A").item(i).innerHTML="Slide " + y + " ";  
	var link=document.all("ppttextbar").all.tags("A").item(i).getAttribute("href");  
	var linkArr=link.split("#");  
	if (linkArr[1]==active){   
		document.all("ppttextbar").all.tags("A").item(i).style.color="#000066";    
		document.all("slideNr").innerHTML=y;  
	}  
	link=linkArr[0] + extra;  
	document.all("ppttextbar").all.tags("A").item(i).setAttribute("href", link);  
	y=y+1; 
} 
}

function showH1Section(section, nrOfSections, anchor){
	for (i=0; i<nrOfSections; i++){
		var id="H1_section_" + i;
		if (id == section) document.all(section).style.display="";
		else document.all(id).style.display="none";
	}
}

function hideBulletStyle(){
	var length=document.all.tags("DIV").length;
	var img=document.hiddenForm.arrowBulletImgPath.value;
	for (i=0; i<length; i++){
		var bullet=escape(document.all.tags("DIV").item(i).innerHTML);
		//alert(bullet);
		if (bullet.indexOf("%D8") != -1){
			bullet=bullet.replace("%D8", "<img src='" + img + "'> ");
			bullet=unescape(bullet);
			document.all.tags("DIV").item(i).innerHTML=bullet;		
		}
		if (bullet.indexOf("%A7") != -1){
			bullet=bullet.replace("%A7", "<img src='" + img + "'> ");
			bullet=unescape(bullet);
			document.all.tags("DIV").item(i).innerHTML=bullet;		
		}
		if (bullet.indexOf("%F0") != -1){
			bullet=bullet.replace("%F0", "<img src='" + img + "'> ");
			bullet=unescape(bullet);
			document.all.tags("DIV").item(i).innerHTML=bullet;		
		}
		if (bullet.indexOf("%u2192") != -1){
			bullet=bullet.replace("%u2192", "<img src='" + img + "'> ");
			bullet=unescape(bullet);
			document.all.tags("DIV").item(i).innerHTML=bullet;		
		}				
	}
	var length2=document.all.tags("SPAN").length;
	for (i=0; i<length2; i++){
		var bullet2=escape(document.all.tags("SPAN").item(i).innerHTML);
		if (bullet2.indexOf("%D8") != -1){
			bullet2=bullet2.replace("%D8", "<img src='" + img + "'>");
			bullet2=unescape(bullet2);
			document.all.tags("SPAN").item(i).innerHTML=bullet2;		
		}
		if (bullet2.indexOf("%A7") != -1){
			bullet2=bullet2.replace("%A7", "<img src='" + img + "'>");
			bullet2=unescape(bullet2);
			document.all.tags("SPAN").item(i).innerHTML=bullet2;		
		}
		if (bullet2.indexOf("%F0") != -1){
			bullet2=bullet2.replace("%F0", "<img src='" + img + "'>");
			bullet2=unescape(bullet2);
			document.all.tags("SPAN").item(i).innerHTML=bullet2;		
		}	
		if (bullet2.indexOf("%u2192") != -1){
			bullet2=bullet2.replace("%u2192", "<img src='" + img + "'>");
			bullet2=unescape(bullet2);
			document.all.tags("SPAN").item(i).innerHTML=bullet2;		
		}					
	}
}

function showImgs(){
	var endn1=(document.hiddenForm.endnote1.value).toUpperCase();
	var endn4=(document.hiddenForm.endnote4.value).toUpperCase();
	var imgPath=document.hiddenForm.imgPath.value;
	if (endn1.indexOf("_NL.")!=-1 || endn1.indexOf("_FR.")!=-1 || endn1.indexOf("_EN.")!=-1 || endn1.indexOf("_D.")!=-1){
		document.all("endnoteTD").item(0).innerHTML="<img class='EndNoteImg' src='" + imgPath + endn1 + "'>";
	}
	if (endn4.indexOf("_NL.")!=-1 || endn4.indexOf("_FR.")!=-1 || endn4.indexOf("_EN.")!=-1 || endn4.indexOf("_D.")!=-1){
		document.all("endnoteTD").item(1).innerHTML="<img class='EndNoteImg' src='" + imgPath + endn4 + "'>";
	}	
}

function SupprLink(){
	var length=document.all.tags("A").length;
	var ToChange=0;
	for (i=0; i<length; i++){
		var origValue=document.all.tags("A").item(i).getAttribute("href");
		if ((origValue != "") && (origValue.indexOf("TopOfPage") == -1)){
			if ((origValue.indexOf("http") != -1) || (origValue.indexOf("www") != -1) || (origValue.indexOf("mailto:") != -1) || (origValue.indexOf("javascript:openWindowC") != -1)){
					var value="#TopOfPage";
					document.all.tags("A").item(i).setAttribute("target","_self");
				}
			else{var value=origValue;}
			document.all.tags("A").item(i).setAttribute("href", value);
		}
	}
}
