// JavaScript Document

function visaDenna(vart) {
	
	var explorer = document.all?true:false
	
	if(window.pageYOffset){
		//alert("window");
		//alert(window.pageYOffset);
		var c = window.pageYOffset;
	} else if (document.documentElement.scrollTop) {
		//alert("scrollTop");
		//alert(document.documentElement.scrolltop);
		var c = document.documentElement.scrollTop;
	} else {
		//alert("nix");
		var c = 0;
	}
	window.location = "http://www.got2get.se/" + vart + "&pos=" + c;
}
var ob = 0;
function openBild(id1,id2,id3) {
	
	
	
	if (ob == 0) {
		bId = id1;
	} else if (ob == 1) {
		if (ob != "tom") {
			bId = id2;
		} else {
			ob = 0;
		}
	} else if (ob == 2) {
		if (id3 != "tom") {
			bId = id3;
		} else {
			ob = 0;
			bId = id1;
		}
	}
	
	if (ob < 2) {
		ob++;
	} else {
		ob = 0;
	}

	//alert(ob + " " + bId);
	
	//alert(bId + " " + ob);
	
	mywindow = window.open ("../../include/loadPage.php?b="+bId, "bild","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=0,width=300, height=300");
	mywindow.moveTo(screen.width / 2 - 150, screen.height / 2 - 200);
	
}

function akthet() {
	
	akt_window = window.open ("../../include/akthet.php", "Bevis","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=0,width=515, height=500");
	
	akt_window.moveTo(screen.width / 2 - 250, screen.height / 2 - 250);
}

function openBlogga(id) {
	
	mywindow = window.open ("../../include/blogga.php?id="+id, "Request","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=0,width=500, height=650");
	
	mywindow.moveTo(screen.width / 2 - 250, screen.height / 2 - 380);
}

function openRequest() {
	
	mywindow = window.open ("../../include/request.php", "Request","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=0,width=500, height=500");
	
	mywindow.moveTo(screen.width / 2 - 250, screen.height / 2 - 250);
}

function openAnnons(id) {
	
mywindow = window.open ("../../include/showAnn_ny.php?id="+id, "Maila","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=1,width=500, height=570");
	
	mywindow.moveTo(screen.width / 2 - 250, screen.height / 2 - 350);
}

function openInst() {
	
	
	mywindow = window.open ("../../include/instruktioner.php", "INSTRUKTIONER","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=1,width=500, height=600");
	
	mywindow.moveTo(screen.width / 2 - 250, screen.height / 2 - 300);
	
	
}

function visaFeed() {
	
	//feedbox = document.getElementById('feedbox');
	
	//alert(document.getElementById('feedbox').style.bottom);
	
	
	//alert(feedbox.style.bottom);
	
	
	// kolla IE 6
	//var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
	// kolla IE 7
	//var IE7 = false /*@cc_on || @_jscript_version == 5.7 @*/;
	// kolla upp till IE 7
	//var gteIE7 = false /*@cc_on || @_jscript_version >= 5.7 @*/;
	
	//Hittar IE
	var isMSIE = /*@cc_on!@*/false;
	
	//alert(isMSIE);
	if (isMSIE == true) {
		if (document.getElementById('feedbox').style.bottom == "-325px" || document.getElementById('feedbox').style.bottom == "") {
			document.getElementById('feedbox').style.bottom = "-15px";
		} else {
			document.getElementById('feedbox').style.bottom = "-325px";
		}
	} else {
		if (document.getElementById('feedbox').style.bottom == "-275px" || document.getElementById('feedbox').style.bottom == "") {
			document.getElementById('feedbox').style.bottom = "-15px";
		} else {
			document.getElementById('feedbox').style.bottom = "-275px";
		}
	}
	
}

function getGET() {
	
	ta = document.location.search;
	document.getElementById("backTrack").value = ta;
	return true;
	
}

function openLog() {
	mywindow = window.open ("../../log.php", "LOG","status=0,toolbar=0,resizable=0,scrollbars=1,width=300, height=500");
	mywindow.moveTo(screen.width / 2 - 150, screen.height / 2 - 200);
}


/* DETTA ÄR FÖR ATT VISA BLOGG HTML BILD */

function show_the_blogg_code(the_id) {
	
	var the_bbc_box = document.getElementById('blogg_kod_'+the_id);
	the_bbc_box.style.display = 'block';
	
}

/* NY FUNKTION FÖR ATT VISA TA BORT/ÄNDRA, TIPSA ANNONS, MAILA ANNONSÖR */


function showContactBox(what_box) {
	
	var theChangeBox = document.getElementById('changeBox');
	var theTipsBox = document.getElementById('tipsBox');
	var theContactBox = document.getElementById('mailBox');
	
	if (what_box == 'changeBox') {
		if (theChangeBox.style.display == 'block') {
			theChangeBox.style.display = 'none';
		} else {
			theChangeBox.style.display = 'block';
			theTipsBox.style.display = 'none';
			theContactBox.style.display = 'none';
		}
	} else if (what_box == 'tipsBox') {
		if (theTipsBox.style.display == 'block') {
			theTipsBox.style.display = 'none';
		} else {
			theChangeBox.style.display = 'none';
			theTipsBox.style.display = 'block';
			theContactBox.style.display = 'none';
		}
	} else if (what_box == 'mailBox') {
		if (theContactBox.style.display == 'block') {
			theContactBox.style.display = 'none';
		} else {
			theChangeBox.style.display = 'none';
			theTipsBox.style.display = 'none';
			theContactBox.style.display = 'block';
		}
	}
	
}

/*

function openAn(id) {
	
	mywindow = window.open ("../../include/contactMe.php?id="+id, "Maila","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=0,width=500, height=500");
	
	mywindow.moveTo(screen.width / 2 - 250, screen.height / 2 - 250);
}

function openKompis(id) {
	
	mywindow = window.open ("../../include/kompis.php?id="+id, "Tipsa","location=0,directories=0,menubar=0,status=0,toolbar=0,resizable=0,scrollbars=0,width=500, height=500");
	
	mywindow.moveTo(screen.width / 2 - 250, screen.height / 2 - 250);
}

*/


