function init() {
	if (navigator.appName == 'Microsoft Internet Explorer') {		
		if (document.documentElement.scrollHeight > document.documentElement.offsetHeight) { 
			document.getElementById('main').style.height = parseInt(document.documentElement.scrollHeight-225)+'px';
		}
		else {
			document.getElementById('main').style.height = parseInt(document.documentElement.offsetHeight-241)+'px';
		}		
	}
	else { 			
		document.getElementById('main').style.height = parseInt(document.documentElement.scrollHeight-240)+'px';
		//document.getElementById('footer').style.top = parseInt(document.documentElement.scrollHeight-90)+'px';
	}
}

function openBanner(banner, url) {
		var banner = window.open('/banner_open.php?banner='+banner+'&url='+url,'banner');
		banner.focus();
}

function initGb() {
	if (navigator.appName == 'Microsoft Internet Explorer') {		
		if (document.documentElement.scrollHeight > document.documentElement.offsetHeight) 
			document.getElementById('center').style.height = parseInt(document.documentElement.scrollHeight-225)+'px';
		else 
			document.getElementById('center').style.height = parseInt(document.documentElement.offsetHeight-240)+'px';		
	}
	else { 			
		document.getElementById('center').style.height = parseInt(document.documentElement.scrollHeight-240)+'px';
	}
}

function showTip(show) {
	document.getElementById('tip').style.visibility = show;
}

function remover(id,namn,typ) {
	var tabort = confirm('Är du säker på att du vill ta bort påminnelsen om '+namn+'s '+typ+'?');
	
	if (tabort == true)
		location.href = '/minsida/vanner/tabort_paminelse/'+id;		
}


function deleteFriend(id,namn) {
	var tabort = confirm('OBS! Tar du bort '+namn+' tar du även bort alla påminelser kopplade till personen.\n Är du säker på att du vill ta bort '+namn+'?');
	
	if (tabort == true)		
		location.href = '/minsida/van/'+id+'/tabort';
}

function deleteGb(ad_id, id, namn, datum) {
	var tabort = confirm("Är du säker på att du vill ta bort "+namn+"s inlägg från "+datum+"?");
	
	if (tabort == true)
		location.href = '/minsida/annons/'+ad_id+'/tabort_gastbok/'+id;
}

function deleteImg(ad_id, img_id, bild, bildnamn) {
	var tabort = confirm("Är du säker på att du vill ta bort "+bild+"?");
	
	if (tabort == true)
		location.href = '/minsida/annons/'+ad_id+'/tabort_bild/'+img_id;
		//location.href = '/member_ads.php?ad_id='+ad_id+'&delete_img='+img_id+'&bild='+bildnamn;
		
}

function deleteAd(ad_id) {
	var tabort = confirm("OBS! Borttagningen är permanent och går inte att återskapa.\n Är du helt säker på att du vill ta bort den här annonsen?");
	
	if (tabort == true)
		location.href = '/minsida/annons/'+ad_id+'/tabort/'+ad_id;
		
}
