###########################################################################
# TSL-BIBLIOTHEK:	FRM_home_Lib
###########################################################################
# $Revision: 1.6 $
# $Author: cbueche $
# $Date: 2001/07/25 08:52:54 $
# $Source: 
# $NoKeywords: $
###########################################################################
#**# 
#*	Diese Library enthlt Funktionen die zur Ausfhrung der
#*	Benutzerverwaltung bentigt werden. 
#*	
#*	FRM_menu ( in table, in test, in idx, in mode )
#*	
#*	
#*@Author: cbueche 
#*/

#**
#*	 FRM_menu whlt im 
#*	Menu und aus der Toolbar aus
#*	
#*
#* @param table	(in)	Index der Tabelle mit den Testdaten
#* @param test	(in)	Name der Spalte mit den Testdaten
#* @param idx	(in)	Name des Testblocks
#* @param mode	(in)	SET/CHK/GEN
#* @return
#*	E_OK:	erfolgreich
#*	else:	fehlerhaft
#*/

public function FRM_navleiste_Oben ( in table, in test, in idx, in mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "navleiste_Oben", 5 );
	rc+=FRM_web_image_click( table, test, "Firma" );
	rc+=FRM_web_image_click( table, test, "Leistungen" );
	rc+=FRM_web_image_click( table, test, "Kunden" );
	rc+=FRM_web_image_click( table, test, "Jobs" );
	rc+=FRM_web_image_click( table, test, "Kontakt" );
	rc+=FRM_web_image_click( table, test, "Download" );
	return rc;
}
public function FRM_navleiste_Links ( in table, in test, in idx, in mode )
{
	auto rc,text,val;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "navbar", 5 );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	rc+=FRM_web_image_click( table, test );
	return rc;
}
public function FRM_bottom ( in table, in test, in idx, in mode )
{
	auto rc;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc+=set_window( "bottom", 5 );
	rc+=FRM_obj_type( table, test, "SearchString", "<kReturn>" );
	rc+=FRM_web_link_click( table, test, "Home" );
	rc+=FRM_web_link_click( table, test, "Leistungen" );
	rc+=FRM_web_link_click( table, test, "Kunden" );
	rc+=FRM_web_link_click( table, test, "Jobs" );
	rc+=FRM_web_link_click( table, test, "Kontakt" );
	rc+=FRM_web_link_click( table, test, "Download" );
	rc+=FRM_web_link_click( table, test, "Sitemap" );
	rc+=FRM_web_link_click( table, test, "Intern" );
	rc+=FRM_web_link_click( table, test, "EMOS Computer Consulting GmbH" );
	return rc;
}


public function FRM_close_browser ( in table, in test, in idx, in mode )
{
	auto rc,val,text;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
	rc = FRM_get_next( table, test, val );
	if ( rc != E_OK )
		return rc;
#--------------
# close_browser
#--------------
	while (win_exists(val)==0)
	{
	rc=set_window(val, 5 );
	rc=win_get_info(val,"label",text);
	tl_step("FRM_close_browser :",rc,text);
	rc = win_activate (val);
	rc = win_close (val);
	wait(2);
	}
	return rc;
}
public function FRM_close_nachricht ( in table, in test, in idx, in mode )
{
	auto rc,val;
	rc = FRM_init_block( table, test, idx, mode );
	if ( rc != E_OK )
		return rc;
#-----------------
# close_browser IE
#----------------
	while (win_exists("Neue Nachricht")==0)
	{
	rc+=set_window("Neue Nachricht", 5 );
	rc+= win_activate ("Neue Nachricht");
	rc+= FRM_obj_type( table, test, "AN" );
	rc+= win_close ("Neue Nachricht");
	}
	
#------------------------
# close_browser Netscape
#------------------------
	while (win_exists("Composition")==0)
	{
	rc+=set_window("Composition", 5 );
	wait(2);
	rc+= win_activate ("Composition");
	rc+=obj_mouse_dbl_click("ListBox",100,10);
	rc+= FRM_obj_type( table, test, "To" );
	rc+= win_close ("Composition");
	}
	return rc;
}



public function close_browser_message()
	{
	auto rc,text;
	if (win_exists ("Message Browser",5)==E_OK)
				{
				rc+=set_window ("Message Browser", 4);
				rc+=win_get_text("Message Browser", text);
				tl_step("Message Browser",rc,text);
				rc+=button_press ("OK");
				}
		return rc;
	}
