function showUploadForm(){
	var text = document.getElementById('remitter_text');
	var logo = document.getElementById('remitter_logo');
	var showUploadFormText = document.getElementById('showUploadFormText');
	var uploadRemitterLogo = document.getElementById('uploadRemitterLogo');

	if(logo.style.display == 'none'){
		showUploadFormText.innerHTML = 'Klicka här för att enbart använda text';
		uploadRemitterLogo.value = '1';
		logo.style.display = 'block';
		text.style.display = 'none';
	}else{
		showUploadFormText.innerHTML = 'Klicka för att ladda upp avsändarens logotyp';
		uploadRemitterLogo.value = '0';
		logo.style.display = 'none';
		text.style.display = 'block';
	}

}
function flipout(){
    var obj = document.getElementById('fo-content');
    var sObj = document.getElementById('flipout-state'); 
    if(obj.style.display != 'none' && obj.style.display != ''){
        obj.style.display = 'none';
        sObj.value = 1;
    }else{
        obj.style.display = 'block';
        sObj.value = 0;
    }
}
function showTelephone(adId){
	var width=290;
	var height=175;
	var url = "http://www.bolagsplatsen.se/ads/"+adId+"/telephone";
	var popw=640;
	var poph=480;

	if (document.all || document.layers) {
	   popw = screen.availWidth;
	   poph = screen.availHeight;
	}
	var posLeft = (popw-width)/2, posTop = (poph-height)/2;

	var attributes = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height + ",left="+posLeft+",top="+posTop;
	window.open(url,'popwin',attributes);
}
function showTelephoneMinisite(adId, minisite){
	var width=290;
	var height=175;
	var url = "http://www.bolagsplatsen.se/minisite/" + minisite + "/ads/"+adId+"/telephone";
	var popw=640;
	var poph=480;

	if (document.all || document.layers) {
	   popw = screen.availWidth;
	   poph = screen.availHeight;
	}
	var posLeft = (popw-width)/2, posTop = (poph-height)/2;

	var attributes = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height + ",left="+posLeft+",top="+posTop;
	window.open(url,'popwin',attributes);
}
function showCounsellorContact(url){
	var width=400;
	var height=150;
	var popw=640;
	var poph=480;

	if (document.all || document.layers) {
	   popw = screen.availWidth;
	   poph = screen.availHeight;
	}
	var posLeft = (popw-width)/2, posTop = (poph-height)/2;

	var attributes = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=" + width + ",height=" + height + ",left="+posLeft+",top="+posTop;
	window.open(url,'popwin',attributes);
}
