baseURL = 'http://www.asystance.nl/';	// asystance.nl

//- load popup for tell-a-friend
function sendmail () {
	window.open( baseURL + 'util/tellafriend.php', '', 'width=400,height=330' );
}

// -load popup for contact form
function callme () {
	window.open( baseURL + 'util/callme.php', '', 'width=400,height=330' );
}

// -load popup for subscribe form
function subscribeme () {
	window.open( baseURL + 'util/subscribe.php', '', 'width=400,height=330' );
}

// -load popup for image
function popupImage ( imageurl, width, height ) {
	window.open( baseURL + 'util/popupImage.php?src=' + imageurl, '', 'width=' + width + ',height=' + height );
}


// take user to top of page
function goUp () {
	var tehURL = window.location.href;
	
	if ( tehURL.indexOf('#') == -1 ) {
		window.location.href = tehURL + '#banner';
	} else {
		window.location.href = tehURL.substring( 0, tehURL.indexOf('#') ) + '#banner';
	}
	return false;
}

// taken from http://www.sitepoint.com/article/standards-compliant-world/1
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


