function initialize(recCoord)
	{
		coord = recCoord.split(/,/);
	      if ( GBrowserIsCompatible() )
			{
				var map = new GMap2( document.getElementById( "googleMap" ) );
				map.setCenter( new GLatLng( coord[0], coord[1] ), 8 );
				map.setUIToDefault();
				map.disableScrollWheelZoom();
				
				var bubspaIcon = new GIcon( G_DEFAULT_ICON );
				bubspaIcon.iconSize = new GSize(24, 38);
				bubspaIcon.image = "/images/gmapMarker.png";
				markerOptions = { icon:bubspaIcon };
				
				var point = new GLatLng( coord[0], coord[1] );
				map.addOverlay( new GMarker( point, markerOptions ) )
			}
    }




function emailCheck(e)
	{
		ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";
		
		for(i=0; i < e.length; i++)
			{
				if (ok.indexOf(e.charAt(i)) <0 )
					{ 
						return (false);
					}	
			} 

		if (document.images)
			{
				re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
				re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
				if (!e.match(re) && e.match(re_two))
					{
						return (-1);		
					} 
			}
	}




function slideSwitch()
	{
		var $active = $('#slideshow img.active');
		
		if ($active.length == 0) $active = $('#slideshow img:last');
		
		var $next =  $active.next().length ? $active.next() : $('#slideshow img:first');
		
		$active.addClass('last-active');
		
		$next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 3000, function() {
			$active.removeClass('active last-active');
		});
	}



function Show_Popup(action, userid)
	{
		$('#popupBox').fadeIn('fast');
		$('#popupWindow').fadeIn('fast');
	}
	
function Close_Popup()
	{
		$('#popupBox').fadeOut('fast');
		$('#popupWindow').fadeOut('fast');
		$('body').css('overflow', 'auto');
	}



$(function(){
	setInterval( "slideSwitch()", 6000 );
});
