function SB_SwapImage( SourceObject , ImageUrl )
{
if( ImageUrl != undefined )
{
	SourceObject.src = ImageUrl;
}
}
function SB_OpenNewWindow( SourceObject , Url, Target, bTokenGuid, Width, Height )
{
var strFeatures = "";

if (bTokenGuid == "True")
{
  var now = new Date();
  var rand = Math.random().toString();
  var gGuid = now.getTime() + rand.substr( rand.indexOf ( "." ) + 1 ) + rand.substr( rand.indexOf( "." ) + 1 );
	gGuid = gGuid.substring( 0, 8 ) + "-" + gGuid.substring( 8, 12 ) + "-" + gGuid.substring( 12, 16 ) + "-" + gGuid.substring( 16, 20 ) + "-" + gGuid.substring( 20, 32 );

  Url += "&TokenGuid=" + gGuid;

}

if (( Width != "") && (Width != undefined))
{
	if( strFeatures != "" )
		strFeatures += ",";
			
	strFeatures += "width=" + Width;
}
	
if(( Height != "" ) && (Height != undefined))
{
	if( strFeatures != "" )
		strFeatures += ",";
			
	strFeatures += "height=" + Height;
}

if ( strFeatures == "" )
{
  window.open( Url, Target)
}
else
{
   window.open( Url, Target, strFeatures )
}

}
