function writeM(addr, dom, tld, name) {
	var first = '&#109;a';
	var second = 'i&#108;';
	var third = 't&#111;:';
	title = 'Mail ' + name;
	document.write('<a href="');
	document.write(first+second+third);
	document.write(addr);
	document.write('&#64;');
	document.write(dom);
	document.write('&#46;');
	document.write(tld + '"');
	if (title && title.length > 0 && name != 0)
		document.write(' title="' + title + '"');
	document.write('>');
	if (name == 0) { //show plain addr.
		document.write(addr);
		document.write('&#64;');
		document.write(dom);
		document.write('&#46;');
		document.write(tld);
	}
	else
			document.write('mail');
	document.write('<\/a>');
}


var popWins = new Array();
theOptions = '';

function popWin(theUrl, theWinname, theWidth, theHeight, theOptions) {
	popWins[theWinname] = window.open(theUrl, theWinname, 'width='+theWidth+', height='+theHeight+', toolbar=0, location=0' + theOptions);
	popWins[theWinname].focus();
}

function showFlyer(theFlyer,theWidth,theHeight) {
	theOptions = ',scrollbars=1,status=1,resizable=1';
	popWins[theFlyer] = window.open('/' + sitelang + '/digi-flyers/' + theFlyer, theFlyer + 'Win', 'width='+theWidth+', height='+theHeight+', toolbar=0, location=0' + theOptions);
	popWins[theFlyer].focus();
}

function showGB() {
	theValue = 'guestbook'
	theWidth = 300;
	theHeight = 420;
	theOptions = ',scrollbars=1,status=1';
	popWins[theValue] = window.open('/' + sitelang + '/guestbook/?pop=true', theValue + 'Win', 'width='+theWidth+', height='+theHeight+', toolbar=0, location=0' + theOptions);
	popWins[theValue].focus();
}

function showPpics(theEvent, theSeries) {
	theWin = theEvent + 'Ppics';
	theWidth = 648;
	theHeight = 580;
	theOptions = ',scrollbars=1,status=1,resizable=1';
	popWins[theWin] = window.open('/' + sitelang + '/partypics/' + theEvent + '/' + theSeries + '/?pop=true', theWin + 'Win', 'width='+theWidth+', height='+theHeight+', toolbar=0, location=0' + theOptions);
	popWins[theWin].focus();
}

function visitUrl(theUrl, newW) {
	if (newW == 1)
		window.open(theUrl);
	else {
		if (newW == 3) {
			lang = document.getElementById('udataform').lang.value;
			theUrl = '/' + lang  + theUrl;
		}
		document.location.href = '' + theUrl;
	}
}

function hov(loc,cls) {
   if(loc.className)
      loc.className=cls;
}
