	function showMainMenu(p_element)
	{
		document.cookie = "subMenu=" + p_element;
	}

	function swap(p_source, p_swapimage)
		{
			p_source.src=p_swapimage;
		}
	
	function showSubMenu(p_element)
	{	
		var doc = document.getElementsByTagName('tr');
		var tagname;
		var ismsubenue;
		
		for (var i = 0; i < doc.length; i++)
		{
			tagname=doc[i].id;
			issubMenu=tagname.indexOf('sub');
			if(issubMenu >= 0)
			{
				if(tagname!=p_element)
				{
					if(doc[i].style.display=='')
					{
						void(doc[i].style.display='none')
					}
				}
			}
		}
		
		if(document.getElementById(p_element).style.display == 'none')
		{
			document.cookie = "subMenu=" + p_element;
			document.getElementById(p_element).style.display = '';
		}
		else
		{
			document.cookie = "subMenu="
			document.getElementById(p_element).style.display = 'none';
		}
	}
	
	function initMenu()
	{
		if (getCookie('subMenu')!=null)
		{
			showSubMenu(getCookie('subMenu'));
		}
		
	}
	
	function getCookie(name)
	{
		var dc = document.cookie;
		var prefix = name + "=";
		var begin = dc.indexOf("; " + prefix);
		
		if (begin == -1)
		{
			begin = dc.indexOf(prefix);
			if (begin != 0) return null;
		}
		else
			begin += 2;
			var end = document.cookie.indexOf(";", begin);
			if (end == -1)
			end = dc.length;
			return unescape(dc.substring(begin + prefix.length, end));
		}

	function openCallBackWindow(p_url)
	{	
		var result = window.open(p_url,'PopUp','scrollbars=yes,width=420,height=530, top=10, left=20');
	}



                 
                        function setValue(data) {
                        
                                    //alert(data);
                                    
                                    var movie = findFlash('flash');
                                    if (movie) {
                                      movie.SetVariable('value', data);
                                    } else {
                                       alert('Browser not compatible with Flash communication');
                                }
                        }
                        function findFlash (flash) {
                                if (document.all) {
                                      if (document.all[flash]) {
                                                return document.all[flash];
                                      }
                                      if (window.opera) {
                                                var movie = eval(window.document + flash);
                                                if (movie.SetVariable) {
                                                          return movie;
                                                }
                                             }
                                      return;
                                    }
                                   if(document.layers) {
                                      if(document.embeds) {
                                                var movie = document.embeds[flash];
                                                if (movie.SetVariable) {
                                                          return movie;
                                                }
                                             }
                                      return;
                                    }
                                    if (!document.getElementById) {
                                      return;
                                    }
                                    var movie = document.getElementById(flash);
                                    if (movie.SetVariable) {
                                      return movie;
                                    }
                                    var movies = movie.getElementsByTagName('embed');
                                    if (!movies || !movies.length) {
                                      return;
                                    }
                                    movie = movies[0];
                                    if (movie.SetVariable) {
                                      return movie;
                                    }
                                return;
                          }
                          function getObject(id) {
   							if (document.getElementById) {
          						obj = document.getElementById(id);
       						}    
       						else if (document.layers) {
          						obj = eval("document."+id);
       						}
       						else if (document.all) {
          						obj = eval("document.all."+id);
       						}
							return obj;
						}     
