/******************************************************************************
* Filename:     master.js
*
* Project:      RealWest
*
* Author:       Steffen Ledwig
*
* Date:         15.02.2007
*
* Description:  
*
* Revision:     1.0
*
* Changes:      
*
* URL:          http://www.medienteam.biz
*
* Copyright:    MedienTeam Dresden GmbH
******************************************************************************/

/******************************************************************************
*
* Function:     goIndex
*
* Description:  schaltet von index.html auf index.php
*
* Changes:		
*
* Parameters:   none
*
* Returns:      none
*
******************************************************************************/

function goIndex(){
	this.location.href = 'web/index.php';
}


/******************************************************************************
*
* Function:     showAlert()
*
* Description:  zeigt das Alertfenster
*
* Changes:		
*
* Parameters:   AlertText
*
* Returns:      none
*
******************************************************************************/

function showAlert(msg){
	
	document.getElementById('msgLabel').innerHTML = msg;
	
	
	posX = document.body.offsetWidth / 2 -125;
	posY = 350;

	document.getElementById('myAlert').style.left = posX;
	document.getElementById('myAlert').style.top = posY;
}


/******************************************************************************
*
* Function:     uniOver
*
* Description:  
*
* Changes:		
*
* Parameters:   none
*
* Returns:      none
*
******************************************************************************/


function uniOverOut(str,imgSrc,type){


	switch(type){
		
		case"td":
			document.getElementById(str).style.backgroundImage = "url("+imgSrc+")";
		break;
		
		default:
			document.getElementById(str).src = imgSrc;
		break;
	}


}


/******************************************************************************
*
* Function:     uniAni
*
* Description:  
*
* Changes:		
*
* Parameters:   none
*
* Returns:      none
*
******************************************************************************/
/*
var cnt = 1;
var aktiv = window.setInterval("uniAni()",1000);

function uniAni(){

	webGfxDir_FromIndex = 'gfx/';
	lang = 'de';

	uniOverOut('navi_head0'+cnt, webGfxDir_FromIndex+'navi_head0'+cnt+'_'+lang+'_over.png','');

	cnt++;	
	if(cnt == 5 ){
		window.clearInterval(aktiv);
	}
}*/


/******************************************************************************
*
* Function:     uniover
*
* Description:  
*
* Changes:		
*
* Parameters:   none
*
* Returns:      none
*
******************************************************************************/
/*
var save=''; 

function uniover(src,str,lang) 
{	
	if(document.form1.save=='') save=''; 
	tmpsrc = src+"mid_"+str+"_"+lang+"_over.png";
	tmpsrcBW = src+"lf_"+str+"_"+lang+"_over.png";
	
	imgNm = "mid_"+str+"_"+lang;
	imgNmBW = "bw_"+str+"_"+lang;
	
	if(str!=save){
		document.form1[imgNm].src=tmpsrc;
		document.form1[imgNmBW].src=tmpsrcBW;
	}
}
*/

/******************************************************************************
*
* Function:     uniout
*
* Description:  
*
* Changes:		
*
* Parameters:   none
*
* Returns:      none
*
******************************************************************************/
/*
function uniout(src,str,lang)
{ 
	tmpsrc = src+"mid_"+str+"_"+lang+"_normal.png";
	tmpsrcBW = src+"bw_"+str+"_"+lang+"_normal.png";
	
	imgNm = "mid_"+str+"_"+lang;
	imgNmBW = "bw_"+str+"_"+lang;
	
	if(str!=save){
		document.form1[imgNm].src=tmpsrc;
		document.form1[imgNmBW].src=tmpsrcBW;
	}
} 
*/

/******************************************************************************
*
* Function:     winopen()
*
* Description:  ?ffenen von einem Fenster ohne Menu Status und Location
* 				
* Parameters:   herfStr,wdh,hei,xpos,ypos
*
* Returns:      none
*
******************************************************************************/

function winopen(herfStr,wdh,hei,scb,xpos,ypos,winNm){

	if(herfStr=="")alert('herfStr?');
	if(wdh=="")wdh=100;
	if(hei=="")hei=100;
	
	if(scb=="")scb="YES";
	
	if(xpos=="")xpos=100;
	if(ypos=="")ypos=100;

	if(winNm=="")winNm='win1';
	
	/*imgFolder = document.form1.imgFolder.value;
	bild = document.form1.bild.value;

	herfStr += "?imgFolder="+imgFolder+"&bild="+bild;*/

	F1 = window.open(herfStr,winNm,'menubar=NO,status=NO,locationbar=NO,resizable=NO,scrollbars='+scb+', width='+wdh+', height='+hei+', left=100, top=100');
	F1.focus();

	
}