/******************************************************************************
* 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
*
******************************************************************************/

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:  
*
* Changes:		
*
* Parameters:   herfStr,wdh,hei,x,y
*
* Returns:      none
*
******************************************************************************/

function winOpen(herfStr,wdh,hei,res,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';
	

	F1 = window.open(herfStr,winNm,'menubar=NO,status=NO,locationbar=NO,resizable='+res+',scrollbars='+scb+', width='+wdh+', height='+hei+', left=100, top=100');
	F1.focus();

}