var IE7 = false;
/*@cc_on
	@if (@_jscript_version >= 5.7)
		IE7 = true;
	@end
@*/
var IE6 = (document.all?true:false) && !IE7;
var IE = IE6 || IE7;


function sleep(ms){
	var time = (new Date()).getTime();
	var stopTime = time+ms;
	while((new Date()).getTime() < stopTime){};
} 


function mailToMe(){
	document.location = "mailto:" + 
											"info" + 
											unescape("%" + "40") + 
											"gorrion" + 
											unescape("%" + "2E") + 
											"ch";
}

function openTab(url, params, title){
	if (title == '')
		title = '_blank';
	window.open(url, title, params);
}

function openWin(url, params){
	openTab(url, 'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, left=0, top=0' + params, 'TheNewWindow');
}

window.onload = externalLinks;

function externalLinks() {
	if(!document.getElementsByTagName) return;
	var links,a,i;
	links = document.getElementsByTagName("a");
	for(i=0;i<links.length;i++) {
		a = links[i];
		if(a.getAttribute("rel") && a.getAttribute("rel").indexOf("external") > -1) {
			a.onclick = function() {
				window.open(this.href);
				return false;
			};
		}
	}
}

