function sjf_change_bg(sjv_id)
{
	switch(sjv_id)
	{
		case "default":
    		document.getElementById('sc_wrap_container').style.backgroundImage = "url('media/templates/t1/images/bg_c_0.jpg')";
		break;
		case "mag":
			document.getElementById('sc_wrap_container').style.backgroundImage = "url('media/templates/t1/images/bg_c_0_mag.jpg')";
		break;
		case "pr":
			document.getElementById('sc_wrap_container').style.backgroundImage = "url('media/templates/t1/images/bg_c_0_pr.jpg')";
		break;
		case "jou":
			document.getElementById('sc_wrap_container').style.backgroundImage = "url('media/templates/t1/images/bg_c_0_jou.jpg')";
		break;
		case "eve":
			document.getElementById('sc_wrap_container').style.backgroundImage = "url('media/templates/t1/images/bg_c_0_eve.jpg')";
		break;
	}
	
}

function sjf_pr_slide_init(sjv_content)
{
	sjv_page = 0;
	sjv_path = '';
	
	switch(sjv_content)
	{
		case "sp":
			sjv_path = 'spitzer/';
		break;
		case "mu":
			sjv_path = 'mucs/';
		break;
		case "kl":
			sjv_path = 'klimaherbst/';
		break;
	}
	
	sjf_pr_slide_set_img();

	sjf_div_show('sc_slideshow');
	
}

function sjf_pr_slide_change(sjv_direction)
{
	switch(sjv_direction)
	{
		case "fo":
    		sjv_page += 2;
		break;
		case "ba":
			if(sjv_page >= 2)
			{
    			sjv_page -= 2;
			}
		break;
	}
	sjf_pr_slide_set_img();
}

function sjf_pr_slide_set_img()
{
	document.getElementById('sc_slideshow_image_1').src = 'media/images/hefte/'+sjv_path+'/'+sjv_page+'.jpg';
	document.getElementById('sc_slideshow_image_2').src = 'media/images/hefte/'+sjv_path+'/'+(sjv_page+1)+'.jpg';
}




function prepareImageSwap(elem,mouseOver,mouseOutRestore,mouseDown,mouseUpRestore,mouseOut,mouseUp) { 
//Do not delete these comments. 
//Non-Obtrusive Image Swap Script V1.1 by Hesido.com 
//Attribution required on all accounts 
    if (typeof(elem) == 'string') elem = document.getElementById(elem); 
    if (elem == null) return; 
    var regg = /(.*)(_nm\.)([^\.]{3,4})$/ 
    var prel = new Array(), img, imgList, imgsrc, mtchd; 
    imgList = elem.getElementsByTagName('img'); 
    for (var i=0; img = imgList[i]; i++) { 
        if (!img.rolloverSet && img.src.match(regg)) { 
            mtchd = img.src.match(regg); 
            img.hoverSRC = mtchd[1]+'_hv.'+ mtchd[3]; 
            img.outSRC = img.src; 
            if (typeof(mouseOver) != 'undefined') { 
                img.hoverSRC = (mouseOver) ? mtchd[1]+'_hv.'+ mtchd[3] : false; 
                img.outSRC = (mouseOut) ? mtchd[1]+'_ou.'+ mtchd[3] : (mouseOver && mouseOutRestore) ? img.src : false; 
                img.mdownSRC = (mouseDown) ? mtchd[1]+'_md.' + mtchd[3] : false; 
                img.mupSRC = (mouseUp) ? mtchd[1]+'_mu.' + mtchd[3] : (mouseOver && mouseDown && mouseUpRestore) ? img.hoverSRC : (mouseDown && mouseUpRestore) ? img.src : false; 
                } 
            if (img.hoverSRC) {preLoadImg(img.hoverSRC); img.onmouseover = imgHoverSwap;} 
            if (img.outSRC) {preLoadImg(img.outSRC); img.onmouseout = imgOutSwap;} 
            if (img.mdownSRC) {preLoadImg(img.mdownSRC); img.onmousedown = imgMouseDownSwap;} 
            if (img.mupSRC) {preLoadImg(img.mupSRC); img.onmouseup = imgMouseUpSwap;} 
            img.rolloverSet = true; 
        } 
    } 
    function preLoadImg(imgSrc) { 
        prel[prel.length] = new Image(); prel[prel.length-1].src = imgSrc; 
    } 
} 
function imgHoverSwap() {this.src = this.hoverSRC;} 
function imgOutSwap() {this.src = this.outSRC;} 
function imgMouseDownSwap() {this.src = this.mdownSRC;} 
function imgMouseUpSwap() {this.src = this.mupSRC;}
