// Inhoud voor de pulldown menu's en sommige lijsten
//
// Formaat is ['pad/bestandsnaam', 'menunaam', 'vouwvelcode']
// Vouwvelcode 0 = Geen vouwvel
// Vouwvelcode 1 = A3 vouwvel (preview = 145 pixels breed)
// Vouwvelcode 2 = dubbel A3 vouwvel (preview = 288 pixels breed)

var myFonts= new Array()
myFonts[0]=['burgundica', 'Burgundica', '1']
myFonts[1]=['collis', 'Collis', '1']
myFonts[2]=['geronimo', 'Geronimo', '2']
myFonts[3]=['lexicon', 'Lexicon', '2']
myFonts[4]=['lexicon_headline', 'Lexicon Headline', '1']
myFonts[5]=['renard', 'Renard', '1']
myFonts[6]=['ruse', 'Ruse', '1']
myFonts[7]=['trinite', 'Trinit&eacute;', '2']
// myFonts[6]=['trinite_titling', 'Trinit&eacute; Titling', '0']


// Formaat is ['bestandsnaam', 'menunaam (engels)', 'menunaam (nederlands)']

var myMisc= new Array()
myMisc[0]=['news', 'Latest additions', 'Nieuwste aanvullingen']
myMisc[1]=['samplesheets', 'Sample sheets', 'Proefvellen']
myMisc[2]=['customfonts/index', 'Custom fonts', 'Custom fonts']
myMisc[3]=['updates', 'Font updates', 'Updates']
myMisc[4]=['prijzen', 'Price information', 'Prijzen']
myMisc[5]=['mailing_form', 'TEFF Mailinglist', 'TEFF Mailinglijst']


// Google analytics
var statsflag = true;



// ga naar lokaties vanuit dropdown menu
function goPage(myoptions) 
	{
	destination = myoptions[myoptions.selectedIndex].value;
	if ((destination == "null") || (destination == ""))
		{
		myoptions.selectedIndex = 0;
		return true;
		}
	if (destination == 'http://store.esellerate.net/teff/store')
		{
		window.open(destination, '_blank');	
		}
	else
		{
		window.open(destination, '_top');
		}
	myoptions.selectedIndex = 0;
	return true;
	}



// fonts in drop down menu
function writeFonts(mypath)
	{
	for (var x=0; x<myFonts.length; x++)
		{
		document.write("<option value= '" + mypath + "fonts/" + myFonts[x][0] + "/index.html'>" + myFonts[x][1] + "</option>");
		}
	}



// other options in drop down menu
function writeOthers(mypath)
	{
	for (var x=0; x<myMisc.length; x++)
		{
		document.write("<option value='" + mypath + "fonts/" + myMisc[x][0] + ".html'>" + myMisc[x][1] + "</option>");
		}
	}



// Anti-spambot e-mail script
function mySend(style,prefix)
	{ 
	var myAddress = prefix + '@teff.nl';
	document.write('<a class="' + style + '" href="mailto:' + myAddress + '">' + myAddress + '</a>');
	}



// fontnamen op prijzen pagina
function writeHorizFonts()
	{
	for (var x=0; x<myFonts.length; x++)
		{
		document.write("<a href='" + myFonts[x][0] + "/" + myFonts[x][0] + "_prijs.html' target='boven' class='diap'>" + myFonts[x][1] + "</a>");
		if (x < myFonts.length-1)
			{ document.write("<font class='blauw3'>&nbsp;|&nbsp;</font>"); }
		}
	}



// plaatjes op samplesheets pagina
function insertSamplesheets()
	{
	for (var x=0; x<myFonts.length; x++)
		{
		if (eval(myFonts[x][2]) != 0)
			{ document.write("<tr valign='top' align='left'><td><hr noshade size='1'></td><td><hr noshade size='1'></td></tr><tr valign='top' align='left'><td><p class='bijkopje'><font class='wit'>" + myFonts[x][1] + "&nbsp;&nbsp;&nbsp;</font></p><p class='bijschrift'><font class='wit'><a class='diap' href='" + myFonts[x][0] + "/pdf/" + myFonts[x][0] + "_a3_print-600.pdf' target='_blank'>(View&nbsp;PDF)</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></p></td><td><p class='tekst'><a class='diap' href='" + myFonts[x][0] + "/pdf/" + myFonts[x][0] + "_a3_print-600.pdf' target='_blank'><img src='" + myFonts[x][0] + "/images/" + myFonts[x][0] + "_vouwvel_klein.gif' alt='" + myFonts[x][1] + " sample sheet' width='" + (2 + 143*(eval(myFonts[x][2]))) + "' height='204' border='0'></a><br>&nbsp;</td></tr>"); }
		}
	}



// popup venster
function popUp(str)
	{
	self.name="links"
	menuWin = window.open(str,'menuWin','toolbar=no,width=650,height=580,directories=no,scrollbars=1 ,resizable=1,menubar=no,toolbar=no,location=no,status=1');  
	}



// simpele image switcher
function switchImg(imgid, visibFlag)
	{
		var imgObject = document.getElementById(imgid);
		var t = imgObject.src;
		if (visibFlag == true)
			{
			t = t.replace('normal', 'active');
			}
		else
			{
			t = t.replace('active', 'normal');
			}
		imgObject.src = t
	}
