/// ANFANG POPUP.JS
function getTop() {
	var agt=navigator.userAgent.toLowerCase();
	var is_opera  = (agt.indexOf('opera')!=-1);
	var top = 125;
	if ( is_opera ) {
		top = 25;
	}
	return top;
}

function customPopup(url_location, popupName, width, height, left, topAdjustment, customVariables) {
	var top = getTop() + topAdjustment;
	var variables = "alwaysRaised=yes,directories=no,width="+width+",height="+height+",left="+left+",top="+top+","+customVariables;
 	var popupWindow = window.open (url_location, popupName, variables);
 	popupWindow.focus();
}

function hPopup(url_location, popupName, width, height) {
	var variables = "location=no,scrollbars=yes,menubar=no,resizable=yes,status=no,toolbar=no,titlebar=no";
	customPopup(url_location, popupName, width, height, 350, 15, variables);
}

function cPopup(url_location, popupName, width, height) {
	sa_onclick(url_location);
	var variables = "location=yes,scrollbars=yes,menubar=no,resizable=yes,status=yes,toolbar=no,titlebar=yes";
	customPopup(url_location, popupName, width, height, 100, 0, variables);
}

function popup(url_location, popupName) {
	var top = getTop();
	var variables = "alwaysRaised=yes,directories=no,width=448,height=500,left=100,top="+top+",location=no,scrollbars=yes,menubar=no,resizable=yes,status=no,toolbar=no,titlebar=no";
 	var popupWindow = window.open (url_location, popupName, variables);
 	popupWindow.focus();
}

function addHostPopup(url_location, popupName, width, height) {
	var host = window.location.host;
	if ( host.indexOf("127.0.0.1") > -1 ) {
		host = "hamburger-orthopaeden.de";
	} else if ( host.indexOf("hamburger-orthopaeden.com") > -1 ) {
		host = "hamburger-orthopaeden.de";
	}
		host = "hamburger-orthopaeden.de";
	var url = "http://" + host + url_location;

	var top = getTop();
	var variables = "alwaysRaised=yes,directories=no,width="+width+",height="+height+",left=100,top="+top+",location=no,scrollbars=yes,menubar=no,resizable=yes,status=no,toolbar=no,titlebar=no";
 	var popupWindow = window.open (url, popupName, variables);
 	popupWindow.focus();
}

function getHost(url_location) {
	var host = window.location.host;
	if ( host.indexOf("127.0.0.1") > -1 ) {
		host = "hamburger-orthopaeden.de";
	} else if ( host.indexOf("hamburger-orthopaeden.com") > -1 ) {
		host = "hamburger-orthopaeden.de";
	}
	var url = "http://" + host + url_location;
	return url;
}

/// ENDE POPUP.JS

