function popup(URL, width, height) {
	var w = width + 20;
	var h = height + 30;
	popUpWindow(URL, "SmileDentPopup", w, h, "no", "0");
	return false;
}

function popUpWindow(URL, Name, width, height, resizable, scrollbars) {
	popUp = window.open (URL, Name, 'toolbar=0,location=no,directories=0,status=0,menubar=0,resizable='+ resizable +',scrollbars='+ scrollbars +',width='+ width +',height='+ height);
	if (popUp.opener==null) popUp.opener=self;
	if (window.focus) popUp.focus();
}

function renderEmailLink(address, domain, text) {
	document.write('<a href="mailto:' + address + "@" + domain + '">' + text + '</a>');
}

function makeEmail(address, domain){
	return address + "@" + domain;
}


//////////////////////////////////////////////////

function onloadf()
{
	var aElements = document.getElementsByTagName("a");
	for(var i=0; i<aElements.length; i++)
	{
		if ( aElements[i].className.indexOf("mailto") > -1 )
		{
			aElements[i].setAttribute( "href", "mailto:" + makeEmail("office", "smiledent.rs") );
		}
	}
}


if (window.addEventListener)
{
	window.addEventListener("load", onloadf, false);
}
else
{
	if (window.attachEvent)
	{
		window.attachEvent("onload", onloadf);
	}
	else
	{
		document.onload = onloadf;
	}
}

