var winpo;
function pop_alt(link,h,w,scroll) {
	var win = null;
	if(!w){
		w = 600;
	}
	if(!h){
		h = 347;
	}
	if(scroll == 1){
		sc = "yes";
	 }else{
	 	sc = "no";
	 }
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	if(link != null ){
	link = 'http://www.greatnet.de/cms/'+link+"&l=faq";
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+sc+',resizable,location=no';	
winpo = window.open(link,"Greatnet",settings);
	if(winpo.window.focus){
		winpo.window.focus();
	}	
	}
} 

function bl(){
	$('#poplayer').css('display', 'none');
	/*if (winpo){
		winpo.close();
	}*/
}

$(document).ready(function(){
	$(".popclose").click(
		function () {
			$('#poplayer').css('display', 'none');
			return false;
	});
	
});

function pop(url,h,w,scroll){
	//alert('x');
	if(navigator.appName == "Netscape"){
		pl = window.innerWidth/2-298;
		pt = window.pageYOffset+250;
	}else{
		pl = screen.width/2-298;
		pt = window.document.body.scrollTop+210;
	}
	if(!h)  lh = 210; else lh = h;
	
	$.ajax({
		url: url+"&l=pop",
		type: "GET",	
		dataType: "html",
		scriptCharset: "iso-8859-1", 
		success: function (co) {
			$('#popcontent').html(co);
			$('#popbody').css('height', lh+'px');
			$('#popcontent').css('height', lh+'px');
			$('#poplayer').css('left', pl+'px');
			$('#poplayer').css('top', pt+'px');
			$('#poplayer').css('display', 'block');
		}
	});
	//alert(url);
	//void(0);
}
